I have a Child table with a Ref to the Parent table. I have an action on the child table that executes properly. On the Parent table I have an action (Execute an action on a set of rows) referencing the action on the Child table that is not working. Both tables have a columns with the same log key referenced in the formula.I suspect the Referenced Rows formula is bad.
Select(Log[LogKey], ([LogKey] = [_THISROW].[LogKey]))
Any idea on why this is not working?
Solved! Go to Solution.
Please tryโฆ
Select(WTLog[LogKey], [IssuedKey]=[_thisrow].[IssuedKey])
What is the name of child table and what is the key of the child table?
It should follow this format.
select(childTable[childKey], [parentKeyReferenceInChild]=[_thisrow].[parentKey])
Rich, thanks for the reply.
Referenced Rows formula
Select(WTLog[IssuedKey], [IssuedKey]=[_thisrow].[IssuedKey])
I modified your suggested formula and though, when testing the formula, I get different results than previous formulas I tried It still doesnโt trigger past the Parent table Action Button.
The action being call on the Child table work perfectly. I displayed the action button for the Child table and ran it from the WTLog (Child) main view & detail view. Iโve tried creating a new action on the Parent table using the same formula and parameters. No results.
The Parent table key is the IssuedKey column. The WTLog table has a key named LogKey and a column that contains the IssuedKeys from the Parent table. Would this have an impact on the formula to use?
The โWTLogโ (Child) table IssuedKey column is also the Ref to the โIssuedโ (Parent) table. Would this set up have anything to do with it not working?
Iโm no pro at programming but this seems like it should almost be automatic when thereโs a relationship between tables. Any help would be immensely appreciated.
Please tryโฆ
Select(WTLog[LogKey], [IssuedKey]=[_thisrow].[IssuedKey])
A million thanks Aleksi. It works!!
Iโm wanting to understand why it worked and the others didnโt. Is it because the table key must be used in the first part of the Select() statement to get the related rows list?
I didnโt see that little detail mentioned anywhere in all of the doc, videos, or messages I viewed.
When you reference the child table you need to create a list of child table keys in the child table that AppSheet will apply the action to.
Logically AppSheet will do this:
Does that help?
Yes. Itโs good to know how the flow works now. Aleksi messaged the Referenced Rows formula that works. I didnโt have the actual log key for the child table in the select formula. I thought you could use any column in the table.
Thanks for the info.
Youโre welcome
Thanks guys - I was having the exact same problem and this fixed it!
User | Count |
---|---|
15 | |
11 | |
9 | |
8 | |
4 |