selecting rows to display in slice based on text in column

Hi. Developing AppSheet for Volunteers in a charity who do trainings.
Volunteers (ID/parent/one) related to Trainings (child/many) using ref (to ID).
Set up and working very well. Views show Volunteers and Related Trainings as system generated. Excellent.

I now want to have a 'view' of Volunteers (table/parent) with Related Trainings List (table/children) where the Trainings List is limited to  rows with specific text (the word 'Green') in a particular column (field) in the Trainings dataset.

I have created a DataSet/Slice (Based on table Volunteers) with row condition:
CONTAINS(trainings[module detail],"Green Card")
... where the trainings[module detail] is the table[column] and the "Green Card" is the text (part-text) in the row that I want included. Green Card trainings are a particular group of trainings done together.

All system accepted, but includes rows that do not have 'Green Card' in. All rows in fact.
What am I doing wrong?
Thanks indeed.

Solved Solved
0 5 54
1 ACCEPTED SOLUTION

If understanding of your requirement is correct, please try below

1) You may be having a system generated VC called something as [Related Trainings] in the Volunteers table.

2) In the Volunteers table , create another list type VC with base type as ref called say [Green_Card_Trainings] with an expression something like 

SELECT([Related Trainings][Trainings Table Key column], CONTAINS([module detail],"Green Card"))

3) Please hide the system generated VC [Related Trainings] and instead use the VC [Green_Card_Trainings]  to display the related Trainings records with "Green Card"  text in the [module detail] column.

View solution in original post

5 REPLIES 5

If understanding of your requirement is correct, please try below

1) You may be having a system generated VC called something as [Related Trainings] in the Volunteers table.

2) In the Volunteers table , create another list type VC with base type as ref called say [Green_Card_Trainings] with an expression something like 

SELECT([Related Trainings][Trainings Table Key column], CONTAINS([module detail],"Green Card"))

3) Please hide the system generated VC [Related Trainings] and instead use the VC [Green_Card_Trainings]  to display the related Trainings records with "Green Card"  text in the [module detail] column.

hi Suvrutt,

This makes sense. Thank you indeed. Very useful. You understood my requirement correctly.

"2) In the Volunteers table , create another list type VC with base type as ref called say [Green_Card_Trainings] with an expression something like 

SELECT([Related Trainings][Trainings Table Key column], CONTAINS([module detail],"Green Card"))" I think this will work ...

I will do as you suggest and let you know how I get on.

You are welcome. I hope it worked the way you want.

hi Surutt,

Worked perfectly!

SELECT([All Trainings][_training-ID], CONTAINS([module detail],"Green Card"))

I also did the same for the NOT above as it was requested.

SELECT([All Trainings][_training-ID], NOT(CONTAINS([module detail],"Green Card")))

It was then easy to set up Views for the above. Charity staff happy!

Thanks for your help. David.

You are welcome. Thank you for the update.

Top Labels in this Space