BUG: When Regenerating Table the Required Fields set to False

Hello,

When I regenerate a table that is connected to a MySql DB the fields that were set to required change to not required. Is this expected?

0 16 720
16 REPLIES 16

It doesnโ€™t sound as expected behavior. Did you check the reason for this change from Info page? Normally it explains the reason for that change after you have saved or regenerated the column structure.

HI @Aleksi,

I set the columns to required and regenerated the table structure. They were set to false after regenerating and looking at the Info page and no message was displayed.

I think Iโ€™ve encountered this before. As I recall, I had inadvertently marked a column as required (so it must have a value) but not editable (the user couldnโ€™t supply a value) and the column had neither an app formula nor an initial value (so no automatic value was provided). Basically, I tried to require a blank column.

Hi @Steve ,

This table is a COVID questioner and the columns are YES/NO so I have not set a suggested value. Most of the required columns do not have a inicial or suggested value. How could I then make them required?

Please post a screenshot of the column configuration screen for one of the affected columns.

Are your MySQL columns set to allow NULL values, but you are setting them to required within AppSheet?

In my experience, this is an issue of AppSheets regenerate logic trying to be too intelligent when using SQL databases. Basically, regenerating a table will always reset the โ€˜requiredโ€™ flag based upon your SQL database allowing nulls or not, even if you had previously set them to required.

In most cases, this behaviour is fine. However, sometimes I will have a column that:

  • Can sometimes be NULL, therefore NULLS are allowed on the database
  • has a SHOW() formula to conditionally show it, and is flagged as REQUIRED within appsheet

In AppSheet, columns marked as REQUIRED but that have a SHOWIF of false, will not trigger any validation errors. Convenient. However, regenerating the column structure will toggle off the required variable.

HI @Jonathon,

That is correct data resides in a MySql DB. And they are allowing NULL and I am setting them to required within AppSheet. Some of the columns are Embarazada, Hospitalizado, Fiebre

Here is screen shot of the table Properties:
2X_4_4985cd608b43e13b7949d2fbce0481091975eaa7.png

Does that mean I will have to set them to required every time I need to regenerate?

Here goes. Screen shots before Regenerate:

after regenerate

The Embarazada column is required, but your Show? expression will hide the column under some conditions. If hidden in a form, the column cannot be given a value, which conflicts with being required. To fix, use the expression used with Show? for Required? as well.

I have made the change as suggested.

Any idea on the other required columns?

I donโ€™t see anything wrong with the other column. If that problem persists, youโ€™ll need to engage support@appsheet.com.

Thanks will try again.

I am experiencing the exact same behavior. It seems to me this just started recently. I too am using SQL and my deliberate approach is to allow NULLS in SQL and only define required fields via AppSheet.

@Jamie, are you still experiencing this problem?

Yes, I just confirmed it is still happening.

I have just now confirmed that this issue has been resolved. Support notified me that the fix was deployed on 6/22 but I did not have a chance to test until now.

Top Labels in this Space