Pulling data into a template

I'm trying to setup an attachment template.

I have a table WalkthroughRecords, which has a column Assessment_of_for_learning, which is configured as EnumList because it can take multiple entries.

The entries come from the Criteria table, which has the columns CriterionID and Criterion

I'm trying to pull the text (from the Criterion field) into my template.

I tried a LOOKUP and couldn't get it to work, here's the error

Expression 'Lookup([_THISROW].[Assessment_of_for_learning],โ€Criteriaโ€,โ€CriterionIDโ€,โ€Criterionโ€)' is invalid due to: Cannot compare Number with List in ([CriterionID] = [_THISROW].[Assessment_of_for_learning])

so now I'm trying the expression below but I'm getting the error: Expression 'ANY(SELECT(Criteria[Criterion],IN([_THISROW].[Assessment_of_for_learning],[CriterionID])))' is invalid due to: Parameter 2 of function IN is of the wrong type.

While I'm at it - if I can get this working, I'm assuming it'll work when there's one value. But what if multiple values are chosen, i.e. the Assessment_of_for_learning column contains the values 1, 2, 4, 6?

 

Solved Solved
0 3 122
1 ACCEPTED SOLUTION

So I thought the guidance above helped me correct the error in the Lookup expression, but after many, many, many hours of trying a whole range of things, I eventually worked out that the feedback translated to

"Don't use the Lookup formula at all, just use [EnumList_Ref][ValueFromRefTable], in other words, in my example, I can use [Assessment_of_for_learning][Criterion]"

It's working now, I think.

View solution in original post

3 REPLIES 3

You have an EnumList basetype Ref?
If that's the case, you can use a list dereference, like this:

 

[EumList_Ref][ValueFromRefTable]

 

This will produce a list with all the desired [ValueFromRefTable] per item in the [EnumList_Ref]. Please check the docs:

Dereference expressions - AppSheet Help

So I thought the guidance above helped me correct the error in the Lookup expression, but after many, many, many hours of trying a whole range of things, I eventually worked out that the feedback translated to

"Don't use the Lookup formula at all, just use [EnumList_Ref][ValueFromRefTable], in other words, in my example, I can use [Assessment_of_for_learning][Criterion]"

It's working now, I think.

Top Labels in this Space