Hi. I have an App with the following hierarchy of tables:
Customer
|
Site
|
Job
In each daughter table the Ref column of the parent has the same name as the parent table. Also each parent table has the standard [Related โฆ] column to access daughter records. The Job table has references to both the parent (Site) and grand parent (Customer) records.
The template runs seperately on each Customer records and the START condition is
<<START: Select([Related Jobs][JobID],AND(...
So its creating a list of jobs. The data I want to access is <<[Site].[Name]>> for each of the Job records called by this START condition. But its not working
<<[Site]>> works fine and returns the Site key column
<<[Site].[Name]>> returns nothing and doesnโt error
<<Any(Select(Site[Name],[SiteID]=[_ThisRow].[Site]))>> Errors and says the site column doesnโt exist
<<[_THISROW-1].[Name]>> returns [Customer].[Name]
Iโm presuming this has something to do with the fact that we have the Grand Parent record creatign a list of Grandaughter records. But I canโt work out why I cannot access the parent of a Job record
Obviously I could fix with a virtual column. But the Job table has 16000+ records
Can anyone explain what Iโm doing wrong?
Can you show your whole template?
This is the entire template. Iโve put in <<[Address]>> for now as this is the data thats nearest to what I want
Why not this?
<<START: SELECT([Related Jobs]...
Since [Related Jobs] is already a list of key columns, [JobID]
seems unnecesary
Because thatโs not valid syntax.
Haha, sorry. I wrote the Select()
but ignored it completely! My fault!
Soโฆ have you tried using a FILTER()
expression and adding another =
to your AND()
to pull just the Related Jobs? @1minManager
So the START is not really the issue. Thatโs bringing in the correct rows. The issue is pulling some data, from within those rows, from a parent record. Whats odd is that when I choose <<[Site]>> in the first column of teh template, which is a Ref to the parent table, its clearly pulling in data
I could quickly manage to repro the problem with my sandbox app. This is obviously a bug, I suggest you formally report and register this as bug through support desk.
I have open ticket to the support desk, dot operator to pull the related record value in AppSheet webhook JSON body is not working properly. It sounds to me both cases might share the same root cause? Out of pure guess work thoughโฆ
Ok, Iโve reported mine too.
I think youโre right about it being a bug as I have another template which the parent record (Site) uses START to create a list of daughter (Job) records. In that one <<[Site].[Name]>> works fine
I bet this is perfect bug.
I agree, kind of looks like a bug. Or at least I donโt see any obvious issues. If it was my app I would simplify the scenario down to test it. Like a template that is literally just:
<<START: LIST( "one-key-value")>> <<[Site].[Site Name]>> <<END>>
What happens if SELECT() has 0 rows? is there a way to not print the table?
User | Count |
---|---|
42 | |
29 | |
28 | |
14 | |
14 |