Iโm relatively new to Appsheet, and have only built one app. A new training app Iโm working on needs to have a table that references data in other tables based on various ID numbers. For instance, a trainee may have an employee ID which should link to a table with HR info, a training ID issued by an outside training vendor that links to a table with their classes from that vendor. How can I allow a user to just enter these IDs as text or a number without them picking the number from a list of possible values as a ref normally does? I ask because usually the ID gets assigned before that data is present in the other table, and nobody wants to have to โrememberโ the ID for a week until the info populates. They want to put the ID in when itโs assigned and forget about it, and the ref become โactiveโ once the data is populated in the other sheet(s). Is this possible?
Perhaps provide a simple text input column for the user to enter the IDs into, then the actual ref-type column uses an appformula or initial value formula to read from the input column.
OK, I can give that a try! Out of curiosity, what would be the expected result if the data isnโt โthere yetโ on the referenced sheet? Blank? Error? Thanks!
If a Ref column has a value that doesnโt match the key column value of a row in the referenced table, the Ref value will be displayed with a yellow triangle next to it indicating itโs a broken reference.
OK, so once itโs โunbrokenโ (the data is populated in the referenced sheet) how do I get it to recognize that? For now, itโs staying with the triangle in the detail view. Iโd like (ideally) the detail view to automatically update to a valid ref with no further user intervention if possible.
A Ref value must match the key column value of a row in the referenced table. As soon as that matching key column value exists in a row of the referenced table, the yellow triangle should disappear.
See also:
Yes, Iโve realized it works on one of my tables where the label and key are the same. On another table, the label must be different from the key because thereโs a possibility of duplicate IDs in the source data. This is the one that is not updating because the value of the ref is the label, not the key. How can I โfixโ this without changing the key/label on the referenced table? Is there a way to โtranslateโ the label to the key? For instance, some way to have the ID number they input in the text column (which is the label in the referenced sheet) reach out and โfindโ the key for that row? Iโm not worried about the duplicate IDs because it should be very rare and canโt be helped since this is the data Iโm receiving.
Thanks! This seems to work beautifully.
User | Count |
---|---|
18 | |
11 | |
11 | |
8 | |
4 |