Enumlist is true

Hello,

 

I have an Apparatus table as my parent table. I have an apparatus Inventory table as the child and a Vehicle check list table also as a child table. 

I am correctly pulling my inventory items from the Vehicle check table by using (in the valid if)

Select(
Apparatus Inventory Items[Equipment Description],
AND(
([Subcategory] = "Fitting"),
([VIN] = [_Thisrow].[Vin]),
([Apparatus Compartment] = "Bumper Compartment 1",
)
))

 

This goal is to display what the inventory table says should be there. What i want to do now  is say if all Items are there (selected) then True, else false. 

Is this possible within the column itself? If not and a new column is needed, what expression is needed to say all enumlist items have been selected? I cannot give it a list to check because of the dynamic nature of the inventory table changing/updating items

Solved Solved
0 8 167
2 ACCEPTED SOLUTIONS

Hi @Shock 

So you expression should be:

ISBLANK(

SELECT(
Apparatus Inventory Items[Equipment Description],
AND(
[Subcategory] = "Fitting",
[VIN] = [_Thisrow].[Vin],
[Apparatus Compartment] = "Bumper Compartment 1"
)
) -SPLIT([Fittings Check],",")

)

View solution in original post

Put this 

Select(
Apparatus Inventory Items[Equipment Description],
AND(
([Subcategory] = "Fitting"),
([VIN] = [_Thisrow].[Vin]),
([Apparatus Compartment] = "Bumper Compartment 1",
)
))

into the Autocompute (Suggested Values) section for your EnumList field

The, in the ValidIF section use this

Count(Select(
Apparatus Inventory Items[Equipment Description],
AND(
([Subcategory] = "Fitting"),
([VIN] = [_Thisrow].[Vin]),
([Apparatus Compartment] = "Bumper Compartment 1",
)
))) = Count([_This])

View solution in original post

8 REPLIES 8

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Shock 

You could try list substraction:

 

ISBLANK(
  [_THISROW].[yourEnumListColumn]-
  SELECT(
    Apparatus Inventory Items[Equipment Description],
    AND(
      [Subcategory] = "Fitting",
      [VIN] = [_Thisrow].[Vin],
      [Apparatus Compartment] = "Bumper Compartment 1"
    )
  )
)

 

For reference:

List expressions - AppSheet Help

ISBLANK() - AppSheet Help

I gave it a shot and made a virtual column using that expression. It will only display the Y instead of yes/ no and the why is selected no matter if all the items are chosen or not. But it seems to be on the right path

Aurelien
Google Developer Expert
Google Developer Expert

Can you try wrapping the first part with SPLIT(CONCATENATE(...), "  , ")

 

Also, you may want to break the expression I gave you into 3 separate columns, so that you can better evaluate each component output ๐Ÿ™‚

expression took but the column disappeared.๐Ÿ˜ฌ

I tried this and its displaying whatever was not selected from the list

 

SELECT(
Apparatus Inventory Items[Equipment Description],
AND(
[Subcategory] = "Fitting",
[VIN] = [_Thisrow].[Vin],
[Apparatus Compartment] = "Bumper Compartment 1"
)
) -SPLIT([Fittings Check],",")

Hi @Shock 

So you expression should be:

ISBLANK(

SELECT(
Apparatus Inventory Items[Equipment Description],
AND(
[Subcategory] = "Fitting",
[VIN] = [_Thisrow].[Vin],
[Apparatus Compartment] = "Bumper Compartment 1"
)
) -SPLIT([Fittings Check],",")

)

Put this 

Select(
Apparatus Inventory Items[Equipment Description],
AND(
([Subcategory] = "Fitting"),
([VIN] = [_Thisrow].[Vin]),
([Apparatus Compartment] = "Bumper Compartment 1",
)
))

into the Autocompute (Suggested Values) section for your EnumList field

The, in the ValidIF section use this

Count(Select(
Apparatus Inventory Items[Equipment Description],
AND(
([Subcategory] = "Fitting"),
([VIN] = [_Thisrow].[Vin]),
([Apparatus Compartment] = "Bumper Compartment 1",
)
))) = Count([_This])

So far everything suggested after I said i Tried

SELECT(
Apparatus Inventory Items[Equipment Description],
AND(
[Subcategory] = "Fitting",
[VIN] = [_Thisrow].[Vin],
[Apparatus Compartment] = "Bumper Compartment 1"
)
) -SPLIT([Fittings Check],",")

has given the same result which i can live with. When putting the suggestions into the orginal enumlist question it is invalid unless all choices are selected. 

Rather then stop that question from completing I want another question( the virtual column) to tell me what is missing or not selected. This will allow me to complete the check and deal with that later ( perhaps by giving me a summary of missing items at the end to change in the inventory table)

i accept all answers as solutions for that virtual table and i thank you both for your help..

Next challenge would be if the items were checked as present, then update the timestamp in the Inventory table so i can see when the last known location was checked. 

 
Top Labels in this Space