Select value from another table with a specific condition

Hello to everyone,
Iโ€™m working on app of training course for my company and i have to create a UX where are showed only the employers who have the role of health and safety manager.


I tried with this formula in order to select from the table โ€œCORSIโ€, the list of values of column [DIPENDENTE] where the value of column CORSO is equal to โ€œRAPPRESENTANTE DEI LAVORATORI PER LA SICUREZZAโ€. But in the column DIPENDENTE is type ref from an other table โ€œDIPENDENTIโ€ where is also a column โ€œSTATOโ€ referred to employers in type enum (enabled or disabled). With this formula I would see only the employers that are also Enabled in the table โ€œDIPENDENTIโ€.
This is the structure of my app:

The table INFORMAZIONI is where Iโ€™m setting this formula

Thanks to all who will help me

Solved Solved
0 6 137
1 ACCEPTED SOLUTION

TKS Steve, you are ever so precious!

View solution in original post

6 REPLIES 6

Steve
Platinum 4
Platinum 4

Maybe this:

SELECT(
  CORSI[DIPENDENTE],
  AND(
    (โ€œRAPPRESENTANTE DEI LAVORATORI PER LA SICUREZZAโ€ = [CORSO]),
    ("Enabled" = [DIPENDENTE].[STATO])
  )
)

See also:

TKS Steve, you are ever so precious!

@Steve I have last question to make perfect this section of my app.
I have two company โ€œArancia-ICTโ€ and โ€œKoros Consultingโ€, as you can see in the following printscreen, the filed on the top [Azienda] is Arancia-ICT and i would see in the nested tables, only the employer of Arancia-ICT company and not Koros Consulting like in this screen.

On the contrary, If i go in the next slide clicking on the side arrow, I would see only the employer of the company Koros Consulting and in this case is right

How can i set this condition depending on the name of the company?
Tks a lot!

I tired with this formula but it doesnโ€™t work
SELECT(
CORSI[DIPENDENTE],
AND(โ€œRAPPRESENTANTE DEI LAVORATORI PER LA SICUREZZAโ€ = [CORSO],[SCADENZA]>TODAY(),[AZIENDA]=[_THISROW],
( [DIPENDENTE].[STATO]=โ€œAttivoโ€)
)
)

I solved whit this Formula:
SELECT(
CORSI[DIPENDENTE],
AND(โ€œRAPPRESENTANTE DEI LAVORATORI PER LA SICUREZZAโ€ = [CORSO],[SCADENZA]>TODAY(),[AZIENDA]=[_THISROW].[AZIENDA],
( [DIPENDENTE].[STATO]=โ€œAttivoโ€)
)
)

Very well done!

Top Labels in this Space