Pull records from related table based on value in main table

629
3
06-22-2023 06:31 AM
GordonCourtney
New Contributor II

I used Survey 123 Connect Version 3.18.123 to create a survey. When I view the feature layer, I have the main table and another table that is part of the layer (related I think) for employees which is a repeat ( I am new to this so I apologize if I am not describing this well). 

I have generated a summary report. Everything works, but one of my fields. I am trying to pull records from the employee table based on information from the main table. No matter what I try I receive an error.

Basically, if an employee (or two or three) attend a specific event (the events are in the main table). I want to be able to "query" the event type(main table), order by event date(main table), and pull the employees from the employee table. 

I have attached my Excel  for the Survey 123 Connect, the Summary Report, and a screenshot of my layer in Portal (layer plus the employee table) below. Please look at the Business VSQG section of the report  as I have not formatted the rest completely yet. It is the "employee" column (highlighted) that I cannot get to work.

It produces an error: Error: An error occurred when checking the report template. Failed to parse ${employee_name} since employee_name cannot be found in the current parsing scope.

The error makes sense to me;however, I do not know the correct syntax. I've been spinning my wheels for two days now. I appreciate any guidance as I am in a time crunch.

 

0 Kudos
3 Replies
PetronilaMandeno
Occasional Contributor II

Hmm, I'm not entirely sure, but maybe you need the repeat tag added before the repeat field? So, something like what you have in your first table, but just in that cell? Something like ${#employees}${employee_name}?

Good luck!

0 Kudos
GordonCourtney
New Contributor II

Thank you. I had this and it pulled every employee for every event; not just the one event I wanted it to. I want it to pull the employee by event type. I appreciate your reply, though!

0 Kudos
PetronilaMandeno
Occasional Contributor II

That's odd. Hmm, could you use the position field to filter out what you need?

0 Kudos