Creating a simple app with two tables with a ...

Creating a simple app with two tables with a parent-child relationship.

Parent table creates a UniqueKey for each records.

Child table has many records related to the parent and holds the UniqueKey from the parent for each of the child records.

Appsheet automatically created the child form with โ€œNewโ€ to add related records.

When I click on โ€œNewโ€ it brings up a form with the UniqueKey from the parent already populated.

To my surprise, the user is able to change the UniqueKey value in the child record which breaks the relationship if it is changed.

I cannot figure out how to prevent the user from changing the value in the child record.

Help?

0 10 379
10 REPLIES 10

Try marking that parent UniqueKey column as Hidden in child tableโ€™s column structure.

Tried that.

I checked hidden but then system rebuild unchecks it.

Is that ParentKey part of a computed Key in Child table too? You could consider another independent key for Child table by putting UNIQUEID() in its Initial Value and make it hidden; this way it should also allow you to hide the ParentKey column too; once it is no longer part of the Child tableโ€™s key.

Different key in the child table.

Computed key that combines UniqueKey and Date.

I will test a completely independent key tomorrow.

Yea, if the Parent Key column is part of the computed key, it gives you a warning in the Info page too, right after automatically unhiding it.

@Steve_Langert

You cannot hide a key column. If you donโ€™t want to show it in your form set the Show_if property to =FALSE

Yup, Leventโ€™s solution is better, if you donโ€™t want to mess with existing computed key.

@RezaRaoofi are we in the Community Watch bud?

@Levent_KULACOGLU It worked.

Thank you.

@RezaRaoofi It worked.

Thank you.

Top Labels in this Space