Select Statement

Hi friends,

I have a [MAINTENANCE] table which is related to a [GRAVE] table, which is also connected to the [SERVICE] table.

Problem:

In have a UX for [Maintenance] where I want to select the referenced GraveID to the [Grave] table. Then I want the UX to show me the referenced services (ENUMLIST) from [Service].

This is my statement, which doesn’t generated an error, but is showing ALL the maintenance description from the whole [SERVICE] Table. I only need the assigned services to the Grave:

SELECT(Services[Description], IN([GraveID].[Services], Services[ServiceID] ))

Thanks for helping!

Robert

SELECT(Services[Description], IN([GraveID],[_THISROW].[GraveID])

You have GraveID in Services as a FK, correct?

1 Like

Hi TeeSee1,

The [Services] table is more or less a lookup table and has no reference to any table. Each service description has an serviceID.

This serviceID is stored in the [Grave] table as enumeration as each grave can have multiple services.

My starting point is the [Maintenance]table which looks like this:

BOTFORCE_2-1646901177838.png

Thx. - Robert

Then try

SELECT(
 Services[Description],
 IN([ServiceID],[GraveID].[Services])
)
2 Likes

I get this error: Parameter 2 of function IN is of the wrong type

And I really do not know why.

Reg. Robert

SELECT(
 Services[Description],
 IN([ServiceID],[_THISROW].[GraveID].[Services])
)

Will this work?

1 Like

Thank you for your help TeeSee1 - now it works fine!

Kind regards,

Robert