I am testing AppSheet with my database of coins.
The database is in several sheets of one Google Spreadsheet.
Each Mint (city) includes a Ref to one Territory (ID_Territory) where the Mint is located.
In the view for the list of mints I have grouped them by Territory, so in the group Europe you will find the Mint of Barcelona (Barcelona is in Europe ). So the Ref to Territory seems to be working very nicely.
Now comes the very strange thing happening: When I click the Barcelona Mint to get further detail on this mint in the Territory field the value Europe also should appear. But it doesnโt! Another different territory appears (Asia Persica)!
Any idea what might be happening?!
Screenshot 2020-10-20 at 20.32.19|690x169
I see this is your first post! Welcome to the community!
So in your example Details view, the โIDโ value is the correct ID for Barcelona but the โID_Territoryโ is not correct?
Can you show how you are assigning the โID_Territoryโ value?
Also, this article might help with the usage of Ref columns:
There is a table Territory where each row corresponds with a territory
One of this rows/territories is โWestern Europeโ
There is a table Mint where each row is a โmint locationโ
One of its fields is โID_Territoryโ so each Mint has a Territory but a Territory can have several Mints
ID_Territory is a Ref pointing to Territory where ID is Territoryโs key!
I think we need to compare how you are presenting the Territories in the assignment Form view with how you are displaying them in the Detail view.
For Ref columns, it is important that:
The most common mistake is using a SELECT() expression in Valid_If to control the dropdown list and NOT returning the row key.
With these two important things properly set, the column should provide the proper behavior in all the views without any extra effort on your part. (NOTE: there are exceptions for unique use cases but I donโt think this is one of them)
I would like to see the rest of the โID_Territoryโ column. Specifically, the expressions, if any, for Valid_If, App Formula and Initial Value.
Second, a snapshot of the Territory table showing the columns set as the Key column and Label column.
Third, if the column in your Detail view showing the wrong Territory is different than โID_Territoryโ, then I would like to see the definition (including expressions) of that column.
Your setup of ID_Territory and Territory table looks correct to me.
When you click on the inline action to go to the ID_Territory details (the circle with an arrow to the far right), what does it show as the ID?
What does the sheet show for ID_Territory for the Barcelona mint?
Beyond this I would recommend contacting support@appsheet.com. They will access you app to see whatโs causing the mis-match.
I solved the problem. As easy as changing all IDs (Keys) from Number type to Text typeโฆ
Does each record have a unique key value?
Can you show screenshots of the views that you are clicking from?
User | Count |
---|---|
60 | |
25 | |
13 | |
11 | |
6 |