textmode for filtering custom form in template report? | Community
Skip to main content
Level 10
September 20, 2019
Question

textmode for filtering custom form in template report?

  • September 20, 2019
  • 14 replies
  • 2033 views

Is there any text mode for filtering for a custom form in a template report if your users are using multiple custom forms?

In a project report, it would be this:

objectCategoriesMM:ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

objectCategoriesMM:ID_Mod=in

(i.e. filter on Categories ID)

In a template report there's nothing. I did try copying over the code in the valuefield on the view (I think it's customFormsName), as well as the textmode from the project report. But everything errors out. So can I really only filter off the primary custom form in a template report (i.e. filter on Category ID)?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

Level 8
September 24, 2019

Usually, when something (like a template) can have multiples of something else (like a form), the form is a collection of the template. Workfront has the somewhat mysterious objectCategory as the collection of the template, and the categories are a reference of the objectCategory. I suspect this is where you are having trouble.

Listing a collection, and even a reference of a collection, can be done in text mode by adding a column. To just list all the forms in a tempalte, add a column in text mode to say:

displayname=Custom Forms

listdelimiter=<br>

listmethod=nested(objectCategories).lists

textmode=true

type=iterate

valuefield=category.name

valueformat=HTML

Because it's a reference in a collection and not a direct property of the collection, we can't just filter on the collection. So instead we have to use the text mode EXISTS functionality to link between templates and categories, via objectCategories as the linking object.

So the text mode for the filter will be:

EXISTS:A:$$OBJCODE=CTGY

EXISTS:A:category:ID=[replace with ID of the form (category) you are looking for]

EXISTS:A:ID=FIELD:categoryID

SkyeHaAuthor
Level 10
September 24, 2019
thanks Barry. I was fortunate that there was already an existing reference for the view part of the report--however because there was that, I didn't even think about using an exists filter. :) I should have known. Thanks so much! -skye
SkyeHaAuthor
Level 10
September 24, 2019
I'm going to table this for now (haha). I couldn't get the exists statement to work, which kind of makes sense. (My understanding is that the OBJCAT listing would have to show in the references tab for me to be able to link to it--is that right? and it doesn't so I can't) I did flail around a little with different syntaxes, but no joy. -skye
Doug_Den_Hoed_AtAppStore
Community Advisor
Community Advisor
September 25, 2019

To retrieve all templates that have a particular custom form's guid attached, simply switch your Template report's filter to text mode and use this one-liner:

  • objectCategories:categoryID=41b3dac47210ff4da13ea1c3748ab204

And yes, if you're wondering: it was much harder to figure out than it looks.

Regards,

Doug

William
Community Advisor
Community Advisor
September 25, 2019

I'm so mad! I tried approximations of both Barry's and Doug's solutions over the weekend, but couldn't get my use case to work.

In my case, I was trying to do a similar thing as Skye, but list templates in which a specific form was *not* attached. Therefore, everything I tried had either a NOTEXISTS or _Mod=notin modifier.

So, any idea how to do this with a not equal modifier?

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf
Doug_Den_Hoed_AtAppStore
Community Advisor
Community Advisor
September 25, 2019

Hi Bill,

I invite you to stop beating your head against the wall, as this second line finds Templates that do NOT have a particular custom form:

objectCategories:categoryID=41b3dac47210ff4da13ea1c3748ab204

objectCategories:categoryID_Mod=notin

Sleep well.

Regards,

Doug

SkyeHaAuthor
Level 10
September 25, 2019
thank you Doug! That worked. My user assured me he'd always have a use for that formula, so I appreciate all the time you took in noodling that out :) -skye
William
Community Advisor
Community Advisor
September 25, 2019

That does work, Doug - kind of... It works in a report, but not where I was trying to do it - in the template landing page list.

I guess the real problem is the manner in which I create filters and views. It may be a bad habit of mine, but when I'm creating a report, I start by creating the filter and view in a landing page list. Then I create a new report and apply the existing filter and view. I fell into this habit because there were user requests to look at a single report, but have the ability to switch back and forth between the report's default view/filter and a the view/filter that exists on other reports. And, I found it an easy way to quickly update multiple reports with a new iteration of a view, or, apply a report filter in other reports/landing page lists.

I'm still a fan of this practice, until things like this pop up where a filter works in a report but not a list view, or vice-versa. It's the second time in as many weeks!

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf
Doug_Den_Hoed_AtAppStore
Community Advisor
Community Advisor
September 25, 2019

Gotcha Bill,

I applaud your keep yer views (and groupings and filters) as separate objects convention, and aspire to it myself, as well.

It's unfortunate (and unusual) that it does not work as you'd expect, in this case.

Regards,

Doug

SkyeHaAuthor
Level 10
September 25, 2019
William: This flipped case doesn't work for me either way (in a report or on a template tab filter), and the way it fails indicates a need for an Exists statement. In other words, the result I get when I use a "notin" Mod is basically ALL the templates that have ANY custom form (so anything that isn't blank). -skye