How to use Constraints on Template Grid when Data source is Association.

Hi All, I have association between Challenge and Idea Entity. I have retrieved Ideas from Challenge_Idea association but now want to show only those ideas which have status as “Submitted”. All other statuses need to be hidden, How can I apply constraints on Template grid if data source is set to association? Thank you in advance.
2 answers

You can't do it with data source association, see the documentation here. From that page:

" Sorting columns and searching is not possible in data widgets with an association data source. This is because these features require a database call to function, which an association data source does not necessarily initiate.”

What you can do is create a microflow data source, retrieve the relevant objects by association and use a list operation to filter on the required status and only return those objects.

Finally: are you sure you need to use an Association data source? This is only relevant when the objects have not been committed yet. If they have been committed, you should use the XPath data source.



You can use Database as the source of your Template grid (it is possible to get associations) and use the Xpath to apply your constraint.