dynamic enumlist

Hi all,

I am struggling with an expression. I need to get a dynamic filled drop down box based on a selection of an other dropdown box in the same table/formular.

I have a table with people who offer services like barkeeper, hostess, etc. --> EnumList: PERSON[Services] and PERSON[PersiID] is the key in this PERSON Table. 

I have a table of Events where I have two drop down boxes. The first one ist the requested services (also an enumlist) and a second dropdown box where I need the persons(personID) based on the selection of the first drop down.

So if I have an event where only barkeepers are requested, in the second drop down there should only show the persons who are barkeepers. 

I have this  validIf expression in the EVENT[PersonID] table without errors, but the result is not correct:

select (personal[PersID],in([Service], PERSONAL[service]), true)

Any suggestions?

thanks!

 

 

Solved Solved
0 7 158
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Persons who have any of the required services:

IF(
  ISBLANK([Services],
  Person[PersonID],
  FILTER(
    "Person",
    ISNOTBLANK(
      INTERSECT(
        [Services],
        [_THISROW].[Services]
      )
    )
  )
)

Persons who have all of the required services:

IF(
  ISBLANK([Services]),
  Person[PersonID],
  FILTER(
    "Person",
    ISBLANK([_THISROW].[Services] - [Services])
  )
)

View solution in original post

7 REPLIES 7

FILTER(
 "personal",
 IN(
  [_THISROW].[Service],
  [service]
 )
)
FILTER() - AppSheet Help
IN() - AppSheet Help
Dependent drop-downs - AppSheet Help

Almost ๐Ÿ™‚

If I select a barkeeper I get now all the barkeepers, If I select Barkeepers and Hostess, the list is impty because no one has this combination.

I need the persons (who have multiple disciplines) if either one of them is selected too.

 

Thank you!

 

Then tweak the filter expression to include an OR() statement


@BOTFORCE wrote:

If I select Barkeepers and Hostess


Yikes, I didn't see that:


@BOTFORCE wrote:

(also an enumlist)


Then everything gets waaay more cumbersome and I don't have time right now

Thank you anyway. ๐Ÿ™‚

Steve
Platinum 4
Platinum 4

Persons who have any of the required services:

IF(
  ISBLANK([Services],
  Person[PersonID],
  FILTER(
    "Person",
    ISNOTBLANK(
      INTERSECT(
        [Services],
        [_THISROW].[Services]
      )
    )
  )
)

Persons who have all of the required services:

IF(
  ISBLANK([Services]),
  Person[PersonID],
  FILTER(
    "Person",
    ISBLANK([_THISROW].[Services] - [Services])
  )
)

Thank you Steve, I needed the first statement.

Robert

Top Labels in this Space