So i have a text label with the following formula to tally up employee count when an employee is selected
text label syntax "Approved" & " " & "|" & " " & CountIf('Org Chart', 'Reporting Manager'= mgrVar)
Set(mgrVar, ThisItem.Employee)
This works great when used in a hierarchy format, meaning moving from screen1 (manager) > screen2(supervisor) >screen3(reporting employee)
However, when I use a button that navigate back to the previous screen, the results doesnt change and instead stay the same as the last page it was on. I understand why because it was the last employee selected. Is there a way to dynamically change it to the previous employee?
Ex. if screen1 (Manager "A" has 6 supervisors reporting to him and I click on one of his supervisor (which goes to screen2, who has 10 employees reporting to him), then I click the back button(screen1) I want the information to reflect Manager "A" data which is 6. At the moment it is 10 because it was the last record selected.
I hope this make sense.