Auto-Fill a Form when The Key value has already been used

I have a quality reporting app I've made for my automotive manufacturing company. The basic use is to record any quality issues found during the production of each vehicle via a form. The vehicle identification number (VIN) is used as the key, so there is only 1 entry in the excel table per each vehicle.

Each vehicle's entry then can be added to/edited via a different view if additional issues are found, rather than creating a second entry. I have multiple slices/views created to allow easier organization of different related factors, as well as assigning roles to accounts to curate what can be seen/edited by different levels of employees.

What I'm struggling to accomplish is auto-filling the entry form when a key value (the vehicles VIN) is scanned in via barcode. If an entry for that key value already exists, I want the entire form to fill in all the previously entered information, so that the user can add/edit without having the extra step of searching the full list of entries. Currently you can scan the barcode in another view to see if it has already been entered (then edit the entry), but if it is has not been previously entered, you have to open the entry form and scan again. I want to be able to scan the barcode once to accomplish either task.

I've looked through appsheet's help forums and can't seem to figure it out.

I think LOOKUP would work if the auto-fill info was on a second table, but I am trying to pull the data already entered from just the 1 table.

Any thoughts on if this might be possible? I appreciate any ideas/help!

1 3 118
3 REPLIES 3

 

Use Ref type column and insert formula TOP(ORDERBY(SELECT(TABLE[key], [_THISROW].[VIN] = [VIN], TRUE), TEXT([timestamp], "YYYYMMDDHHMMSS"), TRUE), 1) in the Valid If.

Thanks @Firdaus_AG  for the response. I changed column "VIN" to Ref type and entered the formula in Valid If: TOP(ORDERBY(SELECT(NFSOQualityapp[VIN], [_THISROW].[VIN] = [VIN], TRUE), TEXT([Entry Date], "YYYYMMDDHHMMSS"), TRUE), 1)                      -  NFSOQualityapp is my table, VIN is my key, Entry Date would be for the timestamp column?

but the following error occurs:

"Column Name 'VIN' in Schema 'NFSOQualityapp_Schema' contains a cyclical table reference to 'NFSOQualityapp'."

I am new to appsheet and formulas, I'm sorry if I am misunderstanding your solution. 

Firstly, VIN (as a key) must be unique. From my understanding, if you scan the barcode (is it VIN acting as the barcode?), then the columns of the form auto fill with the previous information that captured by other users. Is that correct?

If my understanding is correct, then you should use Parent and Child table, where VIN should be the key for the Parent table.

Top Labels in this Space