Forum Academy Marketplace Showcase Pricing Features

Dynamic condition needed

Dear Bubblers,

Is there any way to change condition string so that field reference is dynamic?

I have a search page and data page with repeating group on it. Repeating group is based on data table which has 10 fields like Attr1, Attr2, Attr3…etc. Each attribute is yes or no as a value.

Attr1 = yes
Attr2 = no
Attr3 = yes…etc.

I want to show records only if an attribute is set as ‘yes’, one at a time, never combination, for which I want to pass Attr1 or Attr2, etc, as parameter from the search page but it does not seem to work well, as outcome page does not give me any flexibility to set field part, only the value part, which is this case is always static.

Any ideas?

I can’t quite follow your explanation, and perhaps you’re not getting a response because others can’t either.

Could you share a link to your editor? That would help the community better understand what you mean so they can help.

You will need to place a conditional Search query on the repeating group of your search page. For each ‘attr’ you wish to uniquely search for you will need to create a condition. Ie: WHEN Get ATTR from URL = 1 THEN use new search query. In the new search query you can then set attr1, attr2, etc. based on what attr in the URL is equal to.

There are cleaner ways of achieving what you desire (I think, I may be misunderstanding your request) that would require rebuilding portions of your app logic. For starters, you could use a numbers list field on your data type instead of separate attr yes/no toggles. (Ie: single field attr=2,3,4 instead of multiple fields attr1=no,attr2=yes,attr3=yes,attr4=yes,attr5=no).

1 Like

Dear Philip,

I am struggling to build\call this conditional search. If I do “Do a search for” I see static fields only, is it a state that you are refering to? But I can make it show in the selection for the repeating group? Can you please elaborate?

Regarding having an alternative way to do it, I give users a chance to select several attributes at the same time, so having one attribute field with values might work if you let it be list of texts?

For example
Line1, Attribute=1
Line2, Attribute=1,2,3

I like it, but I will have to think about querying on that kind of data, I guest it should be most of the time ‘contains’ condition if I say want to query both lines by Attribute=1
KR,
Anatoly

This topic was automatically closed after 70 days. New replies are no longer allowed.