Forum Academy Marketplace Showcase Pricing Features

Text contains not working for sub setting data in a repeating group

Hi,

I’m trying to show data from a data type in a repeating group with input fields providing “type and find” behavior. I’m trying to have the user type some text and that text is used as the argument of a contains operation on a text field in the data type. I must be doing something wrong. I have posted the URL of the public app below so you can take a look and see what I’m doing wrong. It seems straight forward to me and the logic “should work.”

Some other strange behaviors:

The initial value of the field is empty yet the field contains “empty” condition dumps all of the data in the database.

When I enter text into the input field, NOTHING EVER SHOWS. I can enter the correct text, incorrect text, doesn’t matter. It seems like contains is only true for the empty string and no other string (even if it is exactly the string in the data field.

Help, show me my mistake…

Yes, search against a null value returns everything.

It was working, you needed to hit enter.

I have re-jigged it so that a workflow on change of input drives the data in the box.

type ‘smith’ and hit enter …

You could also use a search box, that allows type ahead. See box below.

Thanks again. I didn’t see the search box but now that makes sense to me to use that instead.

However, in the workflow that you re-jigged, it sort of works when I hit the enter key, but not the way I thought that a substring operation would work.

given my data set of “fred smith” and “wilma jones”, when I type “f” or “fr” or “fre”, the contains operation returns false. only when I type “fred” does it return true. Does :contains only return true for whole words (or strings separated by spaces)? That’s not intuitive from a string operation perspective and is certainly not documented that way in the docs.

I’ll continue with the search box, but the semantics of :contains escape me given the test rig you have modified for me (thanks by the way).

Yup, full word search only.

1 Like