Hi all,
I have what I assume is a very basic question, so pardon my ignorance.
I finally set up a system where I haveโฆ
Iโm sure my method is not the best, but I used automation to populate the second table. So my first question is: is that what everyone else is doing? Is that the best way to get a table of โnew actionsโ while maintaining a โmasterโ database of all my items?
My second question is: when I use this system now, any user input on one of the new rows not causes AppSheet to find that item in my second table and change its status instead of adding another new row, which is what I wantedโฆHow do I make this happen? Is this where โunique IDโ comes in?
Again, pardon my naivete. Iโm slowly learning a lot here and putting it to use.
Thanks.
Hello @Ryan_Wagner, it sure seems to be a unique id situation, could you share a screenshot of your second table structure? if you have a repeating key value youโre gonna update your rows instead of making new ones, thatโs why itโs always important to make sure your key column is unique in all cases.
Hopefully that makes senseโฆ
I see, when you attempt to add a new row to the table 2 do you load the โOBJECTIDโ with the same โOBJECTIDโ as the table 1? If thatโs the case then thatโs whatโs causing that behavior.
For solving that, i suggest that you add a column that is strictly for storing unique keys for each row for table 2, and using uniqueid() in order to populate it for each new row.
You donโt โneedโ to do this for table 1, since it is your master table you wonโt really have repeating entries, since each object should only appear once, this however becomes a problem for your table 2.
Thanks for the help!
I just made a โunique IDโ column for the second table. I also just realized that, in that same second table, the OBJECTID (which is essentially just a name for the item), also has an โinitial valueโ with the โUNIQUEID()โ formulaโฆIs that necessary with my new column? And should I change the โkeyโ from the OBJECTID to the new Unique ID column?
Thanks again.
Ah, nevermind! Got it!
I made the unique ID a key and it is now working!
Thanks again.
@Rafael_ANEIC-PY One more follow-up question, while Iโve got you hereโฆ
Can I also create a unique ID automatically for the first table when someone adds a new item in the first table?
The first table, like I said, is my main database. When someone finds a new item working out in the field, Iโd like them to be able to add it without having to keep trying to figure out an unused numberโฆ
You can always find me here in the forums bro, donโt worry.
Yes, absolutely, itโs always better to have a uniqueid rather than a secuential number for a key, so i recommend it completely.
Awesome, thanks.
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |