How to save a name instead of the ID

Hi,

I have 2 tables. order details and premix.

When adding a new order in the order details table, I select the premix  from a drop down (ref from premix table),

When the record is saved in the order details table, I notice it saved the premix ID instead of the premix name.

one of the solution is using virtual table, but I don't know the formula, what I want to set in app formula.

 

Thank you in advance

Solved Solved
0 4 332
1 ACCEPTED SOLUTION

@gymbuddy What is the purpose of saving the name as well, are you wanting to access the raw sheet and look at the data that way?  Else, if you are using Appsheet to look at the data or creating reports from the data in Appsheet, the ID is all you need since you can use the dereference expressions to get any other columns in the table referenced by the ID.

If you really want to save the name in the table, you could create a column and set it to [premix][premix name column]

View solution in original post

4 REPLIES 4

For a Ref column, it is intentional to store the ID as the data value.  It acts a "pointer" to a specific row and the row key is used for that.  The purpose of a Ref column is so that you can get access to ANY columns in the row from that referenced table.

If the issue you are having is that the ID is displayed in the app rather than the name, the best fix for that is to set the Label as the Name column.  See image. Once done the Name will show instead of the ID any where in the app you show that Ref column - the ID is still stored as the raw data value.  This is for DISPLAY only in the app. 

Screen Shot 2022-09-22 at 12.56.30 PM.png

If you are trying to solve a different issue. please elaborate

Thank you for your reply, I'm really appreciate, my apps show name already in dropdown list, when I save, it save as ID not the name that I choose from dropdown list. After data save the data will send through WhatsApp and the data show like this

 Order ID: acd9d48a Work Order No.: 9999 Purchase Order No.: 999999 Premix Type: 8  

The premix type using ref table from table premix table premix have premix name how I want to display premix name in WhatsApp instead showing premix ID .  If I want to use virtual column and grab the premix name and display in WhatsApp's, what is formula that I want to use 

@gymbuddy What is the purpose of saving the name as well, are you wanting to access the raw sheet and look at the data that way?  Else, if you are using Appsheet to look at the data or creating reports from the data in Appsheet, the ID is all you need since you can use the dereference expressions to get any other columns in the table referenced by the ID.

If you really want to save the name in the table, you could create a column and set it to [premix][premix name column]

Thank you so much, I using virtual column instead create name column.. the result is what I want 

Order ID: b4068e0b Work Order No.: 00000999 Purchase Order No.: 000009999 Premix Name: Porous

Thank you for give me an idea

Top Labels in this Space