Display an element if a search field contains any character of a field in the database

Hi
I’m trying to display an element if a search field contains any character of a field in the database.

Is it possible to achieve this using ‘Dependencies’ section?

Can anyone help?

Thanks in advance.

Hi @Mihiri.Kotalawela ,

To confirm, you have two fields:
Field A
Field B

You want to show Field B depending on whether Field A contains any character? or only if a specific character within A is used.

If it’s the former, one way to do it, is to set Field B to only show when Field A is not empty.

Hope this helps :slight_smile:

Hi ali
Thanks a lot for the reply, but what I want to achieve is the latter. .I.e. Show field B only if a specific character within A is used

Thanks advance

Hi @Mihiri.Kotalawela ,

No worries, we can achieve this in a few ways depending on how you want to build it or dependent on your configuration. It’ll be dependent on the characters you want to be dependent on.

1. Fixed characters
If you have a fixed list of characters, and there isn’t a big list of chars, then you can always have a dependency and add conditions for each character, using an OR separator. So you’d effectively end up with:
Field A > Not Contains > A or B or C or D (etc) > Hide

2. Code Studio
If you have a list of characters that are dynamic to a field (e.g. property, composite, variable, etc) then you would need to extract each character first before you can be dependant on it. This can be achieved with the help of Code Studio, as a presenter, and there would not be a need to dependencies as it’ll be handled in the Code Studio presenter. You would need to get each character using the split() function, then you can create logic to identify the characters and change the wrapper to Hidden row/Hidden column instead.

Hope this helps :slight_smile:

Thanks Ali
I’m after option 2.