Hi guys, I have 3 tables: Table : Agent Na...

(louis-philippe Redaud) #1

Hi guys,

I have 3 tables:

Table : Agent Name

Department Marc

A Luc

B John

C

Table Questions: Num

Department

Questions

Aq1

A

Name?

Aq2

A

City?

Bq1

B

Age?

Table Form

Name

Answer1

Ok, the table Form will be filled by the user. 1st the Name column will be filled with a ref to the Name column of Agent table. I want the description of Answer1 (which is my question) to change depending on who you select on the dropdown just before. The questions depends of the department. e.g : If i choose Marc on the dropdown i want my Answer’s 1 description to be “Name?” but if I choose Luc i want it to be “Age?”

I tried to made it with a LOOKUP… HELP Thanks :slight_smile:

(Aleksi Alkio) #2

Try with ANY(SELECT(Questions[Questions],[Department]=LOOKUP([_THISROW].[Name],Agent,Name,Department)))

(louis-philippe Redaud) #3

@Aleksi_Alkio thanks! I did it with lookup(“q1”&[_thisrow].[departement],…) It works perfectly for the 1st question. But the description of the next questions only change when I answer. All my questions are enum yes/no. I want it to change automatically when I choose my agent. It works for the 1st one, but then I have to click on yes or no to change the description. Otherwise the description is the one on the display.