Problem with input validation

Hello,

I have a problem with one of the forms of my app.
First, i will introduce the model to contextualize:

  • Surveys table: store data about surveys (including Instruments used)
  • Instruments table: has all the instruments with their info (pulled from another database)
  • Instruments used table: instruments used on surveys (1-N relation to surveys, survey can have many instruments used)

The form to add instruments used to the survey works the following way:
User chooses to add one:
3X_3_e_3eff7e45790965eb3becd3fbda601a4354adb183.png

Add form opens with a dropdown input that has to be completed by the user with the code that identifies the used instrument:
3X_0_4_04086083f41aedb4abee35bc11daf28a828f5041.png

This dropdown is an enum that takes codes of instruments from instruments table.
When a code is selected, all the data for that instrument pulls into the fields of the current form.
3X_8_1_815aae3439be686ece005bec5c9fe2a5dc63a1ea.png

It works perfectly
3X_3_1_31c5bc59210995fb0f4b17ab5d326ccb0a1df77b.png

But fails for no reason when text is large (or at least that seems to be the pattern)
3X_f_5_f58e78f05e0fa8bea20f8e2a633cfe9177f2e462.png

In this example the field โ€œmodeloโ€ fails, not sure why, but it happens with other fields.

I checked:

  • The same data type in both tables for the fields that have this errors, they are LongText.
  • No valid if condition

Any clue what may be the cause?

Thanks!

Solved Solved
0 9 239
1 ACCEPTED SOLUTION

So you DO NOT have a Valid_If expression assigned in the [Modelo] column. Ok got it.

Check to make sure there is no MAX character length set.

The text you have shown is not too large for a Long Text column. I donโ€™t believe that is the issue.

View solution in original post

9 REPLIES 9

What data type are you using in the [Modelo] column shown in the Form? Is it a REF column?

Model has the same data type in both tables is LongText

Ok, but in the Valid_If you have shown this expression:

I assume this is used in the column [Modelo] you are having problems with?

Does this value:

3X_c_9_c9d36ca21c18535936beb77beb70e91fd3447a8a.png

exist in the [codigo] column being listed by the SELECT expression?

Yes, maybe that is not relevant.

Not quite,

LOOKUP([_THISROW].[codigo], โ€œInstrumentosโ€, โ€œcodigoโ€, โ€œmodeloโ€)

This is used on modelo.

Hope this helps.
Thanks!

I think this helps explain why its marked as invalid.

The Valid_If expression, noted in your post, is returning a list of values from the column [codigo]. It should return the list of values from the [Modelo] column.

Because you are using an App Formula to assign the [Modelo] value, there really is no reason to have a Valid_If expression listed. Remove the Valid_If and you should be good.

The valid_if expression is returning a list of codigos (codes) because that valid_if is for the column codigo.
The AppFormula is for field modelo, and is working fine.

Logic is right, my question is about the error that pops when text on modelo is too large.

Thanks for your help!

So you DO NOT have a Valid_If expression assigned in the [Modelo] column. Ok got it.

Check to make sure there is no MAX character length set.

The text you have shown is not too large for a Long Text column. I donโ€™t believe that is the issue.

Here is an example entry for a Long Text I inserted - your text PLUS a whole lot more. No error message.

You are right, cant believe that was the error, i assumed longText type would set max character to a large number and didnt even thought about checking that, it was set at 30 char limit, maybe because previusly it was text typeโ€ฆnot sure why.

Thank you very much for your time!

Top Labels in this Space