Optional Filter on Watch Records module - how do I filter on two things within this module? | Community
Skip to main content
New Participant
April 27, 2021
Solved

Optional Filter on Watch Records module - how do I filter on two things within this module?

  • April 27, 2021
  • 3 replies
  • 3560 views

I'm watching for a status on a task but the task name needs to be part of the filter too. I can do 'status=CFX' and I can do name='Write creative brief' but how do I include both of these in the one 'Optional Filter' field in the module properties? I've tried AND and also nothing because the Fusion help says AND is the default anyway. I could put a filter on the route to the next module but it would be neater if I could include both criteria on the 'Optional Filter'. Thanks v much

Best answer by Doug_Den_Hoed__AtAppStore

 

Hi @cory.anderson,

 

Untested but from memory, I suggest you try "repeating yourself", such as this:

 

queueTopicID=6390aa670008106db9777276d7d2d0a1 queueTopicID=639ae26e00026841880ad5b0ed91aeff queueTopicID=6414884e000be9c4e086e8785eb04002 queueTopicID_Mod=in

 

Regards,

Doug

3 replies

New Participant
March 27, 2023

I have a follow up question on this topic. In my case I want to use the Optional Filter to filter in issues whose queue topic ID is one of several. In a report it would look like this:

 

The textmode for this filter separates the queueTopicID's with a tab.

 

queueTopicID=6390aa670008106db9777276d7d2d0a1 639ae26e00026841880ad5b0ed91aeff 6414884e000be9c4e086e8785eb04002 queueTopicID_Mod=in

 

 

But the tab does not work in fusion's Optional Filter. I also tried comma and pipe.

 

queueTopicID=6390aa670008106db9777276d7d2d0a1 639ae26e00026841880ad5b0ed91aeff 6414884e000be9c4e086e8785eb04002&queueTopicID_Mod=in queueTopicID=6390aa670008106db9777276d7d2d0a1,639ae26e00026841880ad5b0ed91aeff,6414884e000be9c4e086e8785eb04002&queueTopicID_Mod=in queueTopicID=6390aa670008106db9777276d7d2d0a1|639ae26e00026841880ad5b0ed91aeff|6414884e000be9c4e086e8785eb04002&queueTopicID_Mod=in

 

None of these delimiters worked. What is the proper way to do it??

 

The only way I could find to do it was a really big OR statement like so:

 

queueTopicID=6390aa670008106db9777276d7d2d0a1&queueTopicID_Mod=in&OR:1:queueTopicID=639ae26e00026841880ad5b0ed91aeff&OR:1:queueTopicID_Mod=in&OR:2:queueTopicID=6414884e000be9c4e086e8785eb04002&OR:2:queueTopicID_Mod=in

 

This is going to get out of hand when there are many queueTopicID's to include so I'm looking for a more efficient way to do it. Any ideas?

 

Thanks!
Cory

 

 

Doug_Den_Hoed__AtAppStore
Doug_Den_Hoed__AtAppStoreAccepted solution
New Participant
March 27, 2023

 

Hi @cory.anderson,

 

Untested but from memory, I suggest you try "repeating yourself", such as this:

 

queueTopicID=6390aa670008106db9777276d7d2d0a1 queueTopicID=639ae26e00026841880ad5b0ed91aeff queueTopicID=6414884e000be9c4e086e8785eb04002 queueTopicID_Mod=in

 

Regards,

Doug

New Participant
March 27, 2023

Thank you Doug! You're the best!

 

The final code that worked was this: 

queueTopicID=6390aa670008106db9777276d7d2d0a1&queueTopicID=639ae26e00026841880ad5b0ed91aeff&queueTopicID=6414884e000be9c4e086e8785eb04002&queueTopicID_Mod=in

 

I placed it here in the Optional Filter of a Watch Record trigger module as shown

 

jrieth
New Participant
April 28, 2021

I usually use the Workfront report tool to create the filter that I want, switch to text mode, and then paste that into Fusion, removing line breaks and replacing spaces with &. ~Jeff

New Participant
April 28, 2021

Hey Jeff. Thanks for that. What a very splendid idea. Thanks v much. All the best, Stuart

New Participant
April 27, 2021

Hi Stuart,

Great question. Essentially, this field allows you to append any filtering capabilities offered by the Workfront API. A useful reference for this filtering capability is this API Basics page (specifically the GET and search behavior).

To specifically answer your question, the syntax for the filter would be:

status=CFX&name=Write Creative Brief

You could also get fancier with "modifiers". For example the following would look for tasks that have that status and the task name has "Write Creative Brief" contained somewhere in it in a case-insensitive manner.

status=CFX&name=Write Creative Brief&name_Mod=cicontains

Lastly, you can also get even fancier with "OR" groupings to identify multiple conditions and group them together in different groups.

Hope that helps. Cheers.

New Participant
April 28, 2021

Thanks v much, Darin. The more I dig the more power i find! Time to head to the API basics page! Thanks again, Stuart