Question about table reference

Hi guys, I am trying to do an Table Ref here, based on the official example 

https://www.appsheet.com/Template/AppDef?appName=BasicReferences-96620&appId=BasicReferences-96620#D...

The example works fine, but when I try to replicate on my cenario, the referenced records, only open the first one, see the screenshots below.

tbl_principal_politicas_WF

Chosk_0-1677761856359.png

tbl_principal_politicas_WF

Chosk_1-1677761897627.png

tbl_workflow

 

 

 

 

Chosk_2-1677761922900.png

When I open the second record as well ( Date 24/02/2023 ) it opens the record with Date 01/03/2023 again.

 

The table design is this.

Chosk_3-1677762100427.png

 

 

Chosk_4-1677762178360.pngChosk_5-1677762194597.png

Chosk_6-1677762214139.png

 

I also tried to do the REF based on "Codigo Politica" wich is the unique values as well "Nome da Politica", but no success.

It opens the first record always.

 

 

 

Solved Solved
0 10 199
4 ACCEPTED SOLUTIONS

You are mixing up Keys with References!

Please expand your screenshot of tbl_Workflow to include the Initial Value column.

It would also help to include a screenshot of your tables inside your sheets.  With the column names and a few rows of data.

View solution in original post

Thank you for doing that ๐Ÿ˜Š

Your screenshot of clicking a row in the table and not getting the correct detail view for that row has made me decide that this could be an invitation to Appsheet Support to investigate or perhaps another community member can help.

I'm sorry I couldn't help you any further.

View solution in original post

In your Target formula, change it to this

LINKTOROW([key],"tbl_Workflow_Detail")

View solution in original post

Also, if you don't wish people to have edit functionality on your detail view, just hide the Edit button?  Set the Behaviour to FALSE in the Edit button definition...

View solution in original post

10 REPLIES 10

I'm not sure that you have set a key in your second table tbl_Workflow?

If you have set a key, then are you certain that the value you have chosen is a unique value?  If you have multiple records all with the same key then Appsheet is showing you the first record in the list.

Yeah I have set a key on tbl_workflow, that is the "Nome of Politica".

This records on tbl_workflow is repeating only on tbl_workflow, but on tbl_Principal_Politicas ( wich is the main table ), they are not repeating.

I also tried to set the "key" column to be the key ( wich is not repeating, formula uniqueid() ), but results in the same ๐Ÿ˜•

Chosk_0-1677764783665.png

 

I am following the same as the example App, see my main table.

 

Chosk_1-1677765386540.png

On the example:

Chosk_2-1677765407553.png

On sample app, the "Department" also is repeating wich is the KEY, but why on sample when clicking on different records it works fine? I'm going crazy here already.. hahaha

 

 

 

You are mixing up Keys with References!

Please expand your screenshot of tbl_Workflow to include the Initial Value column.

It would also help to include a screenshot of your tables inside your sheets.  With the column names and a few rows of data.

ok, here it is the screenshot of tbl_workflow ( many records ) settings

Chosk_3-1677770015052.png

 

Here is the tbl_WorkFlow screenshot

 

Chosk_2-1677769879084.png

tbl_Principal_WF related

Chosk_4-1677770112769.png

 

Chosk_5-1677770158189.pngChosk_6-1677770165726.pngChosk_7-1677770181579.pngChosk_8-1677770187834.png

 

 

 

 

Thank you for doing that ๐Ÿ˜Š

Your screenshot of clicking a row in the table and not getting the correct detail view for that row has made me decide that this could be an invitation to Appsheet Support to investigate or perhaps another community member can help.

I'm sorry I couldn't help you any further.

I figured out what is happening.

The refs are not wrong.

But when clicking on referenced table, this action is bugged.

Chosk_1-1677773006971.png

Chosk_2-1677773041316.png

 

 

Since I dont want to edit the records on referenced table, I did this action to only VIEW the records, but this action is only linking to the first row referenced.

When clicking without this action, it works fine!

Maybe someone of AppSheet team can help this, if this behavior is expected.

@Steve 

In your Target formula, change it to this

LINKTOROW([key],"tbl_Workflow_Detail")

Also, if you don't wish people to have edit functionality on your detail view, just hide the Edit button?  Set the Behaviour to FALSE in the Edit button definition...

YayYyyyyyyyyyyy

This worked!!!

Thank you so much!!!

 

Top Labels in this Space