Creating Keys with Appsheet

Good afternoon, everyone!

Iโ€™m using Appsheet to generate keys for my app. I have a a parent and child table I would like to make a reference with. When using UNIQUEID() in the parent table, a unique key is specified but the ref_row that I have established the relationship from the child table is assigned a different unique ID than the one created for the parent table. How do I create a ref_row from a child table but have the written key from the parent unique written to the child table so the reference stays the same?

0 11 527
11 REPLIES 11

Hi, do you mean that you would like to change the parent for the child?

After really looking over my data, Iโ€™m not sure whatโ€™s going wrong as it appears Appsheet is creating the same UNIQUEID() for both columns. Thereโ€™s an issue with the reference (REF_ROWS) that I canโ€™t seem to figure out.

They keys are matching between both tables yet I get a warning which tells me there is a reference error. If the Unique keys are created by Appsheet on my spreadsheet and the Ref_Rows is pointing to the correct column, what am I doing wrong?

Do you mean that you have the same key value in both tablesโ€ฆ like in parent and child?

Yes. But there is some kind of weird reference thatโ€™s happening that I donโ€™t understand as the references appear to be pointing in all the right directions.

What is your key in the child table? Is it the Ref field?

I had a Valid_If constraint in the wrong column โ€ฆ But Iโ€™m still having an issue. If I use the Valid_IF constraint, is there no way to leave the field as a text option, instead of a drop down so that users can input the data? If its spelled or typed incorrectly, Iโ€™d like an error to pop up instead of a list of attributes from the valid_if constraint.

Yes you can do that if you type the formula like AND(TRUE,โ€œYour own validationโ€)

When I wrap my statement in AND(True, it returns with an error.

Condition AND(โ€œTRUEโ€, AFFILIATES[AffiliateCode]) has an invalid structure: subexpressions must be Yes/No conditions

It needs to be TRUE, not โ€œTRUEโ€. AFFILIATES[AffiliateCode] is not a validationโ€ฆ itโ€™s just a list of values. What is your goal with the validation? What do you want to check?

I realized that after I posted and this seems to be working well. AND(TRUE,IN([AffiliateCode],Affiliates[AffiliateCode]))

Excellent!

Top Labels in this Space