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

(Steve Langert) #1

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.


(Reza Raoofi) #2

Try marking that parent UniqueKey column as Hidden in child table’s column structure.

(Steve Langert) #3

Tried that.

I checked hidden but then system rebuild unchecks it.

(Reza Raoofi) #4

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.

(Steve Langert) #5

Different key in the child table.

Computed key that combines UniqueKey and Date.

I will test a completely independent key tomorrow.

(Reza Raoofi) #6

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.

(Levent KULAÇOĞLU) #7


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

(Reza Raoofi) #8

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

(Levent KULAÇOĞLU) #9

@RezaRaoofi are we in the Community Watch bud?:rofl:

(Steve Langert) #10

@Levent_KULACOGLU It worked.

Thank you.

(Steve Langert) #11

@RezaRaoofi It worked.

Thank you.