reverted to an old version and this is workin...

reverted to an old version and this is working again

Iโ€™m having issues with a Ref to another table ID getting put in when I add a record to the child table.

I have done this in other tables on the same app and it works, but from Customer to Order itโ€™s leaving the โ€œCustomerIDโ€ blank everytime I create a new order for a customer.

I know that is vague in way but thatโ€™s the thingโ€ฆ it seems vague.

Second column is set to Ref and in the details I pick the CustomerInfo Table and it picks up that it needs the CustomerID as the ReferencedKeyColumn.

I have it set to readonly and required, but every new order I create just leaves that field blank.

Then when it shows records for that customer it list every record because they all match.

Which they shouldnโ€™t because itโ€™s set to select based on CustomerID matching.

Hmmm

Any ideas?

Do I need to just delete that table and start again?

0 12 413
12 REPLIES 12

Just noticed another oddity.

There is no reference of a link FROM Customer Info to Order Info.

I broke itโ€ฆ I renamed that virtual columnโ€ฆ now I just have to figure out how to make it again.

@Kevin_Richard we can always make mistakes as itโ€™s a nature of us. Provided you broke a ref ( others will not bother you that much really ), you can always set it back with checking and if needed editing the REF_ROWS expression in the related tableโ€™s virtual column. The expressionโ€™s structure is very basic:

REF_ROWS(โ€œRefTableNameโ€, โ€œRefColumnNameโ€)

@Levent_KULACOGLU Yeah, I donโ€™t know what I did, but I couldnโ€™t get it back.

I hadnโ€™t done much work after causing the problem, so it wasnโ€™t too hard to redo it.

Provided you set any column to read-only, it does not record anything to the base sheet

And provided you have the same key column of a table in another table (which is a normal column), AppSheet assumes there is a link/relationship between those 2 tables and creates a REF column automatically.

I just reverted back to before I hacked it up.

So Iโ€™m goodโ€ฆ just had to redo a bit of work.

@Levent_KULACOGLU I did make it Read Only at one point, but then I turned that off.

I also renamed the auto generated virtual column.

One of those broke it.

Thank you for the advice.

@Kevin_Richard what broke it was setting it to a read-only. You can always rename the auto-generated virtual columns for related tables

@Levent_KULACOGLU So I canโ€™t even put it to โ€œread onlyโ€ and then change it back?

@Kevin_Richard why would you need to assign a read-only to a REF column? itโ€™s against its nature actually

@Levent_KULACOGLU I mean, if I made a mistake like I did.

I thought I was making the right call but then I realized I wasnโ€™tโ€ฆ so I switched it back.

At that point though, itโ€™s just botched for good?

Top Labels in this Space