Hi Triggre Community,
For one of our application we seem to face to following problem multiple times:
We build an application for our customer, which exists out of multiple Organisations (BV’s). Every Organisation has its own Relations, and some Relations can even trade with multiple Organisations of the company. So the relation between Organisation2Relation is N:N.
Now we want to create a filter in the screen where all orders of the company are shown. One of this filter should be ‘Relation’, so they can lookup the orders for a specific Relation. What we would normally use is the function ‘List X Contains Y’. The problem here is that in this function X must be a list and Y must be a single item, but as you read above the relation is N:N and therefore we have ‘List X Contains Y’ where both X & Y are lists.
Has any one of you had this problem before, and found a smart way of building a function within a function or something to bypass this issue?
Looking forward to your reactions!
The best solution is to use a flow part to filter the data. If you want a much more thorough explanation, there is a lesson in the Triggre Academy Ranger that discusses filtering data in multiple steps in more detail. Here is a specific solution for your situation, if I understand it correctly.
In the flow part, you can filter your data step by step. For example, like this:
- Look up – find all relations of the company
- Calculation – use a calculation and select ‘value from flow part’ and then navigate to the list of orders under the list of organizations:
Name this action something like ‘All related organization orders’
- Provide this list of organizations as an output to the flow part.
You can now use this flow part to filter the data you need for your page, simply by placing it before the page and using the output on the page.
It is possible to add more steps in your flow part, if you want to do more filtering. You can also use inputs of course. It may also be interesting to check out the ‘How to create a catalog’ video of Triggre Academy Ranger, as that shows you how to do even more advanced filtering and searching on a page.
Hope this provides a solution for you!
- You must be logged in to reply to this topic.