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 407
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