Yes, I have searched, and I see numerous posts with answers, but haven't found this scenario.
I'm sure I'm missing something...
I have a label (in a gallery, but a label outside the gallery acts the same) that I want to display a value from a column. Column is a lookup from a contact table. Not all records had data in this field, so in testing I wanted to show either the data, or "Unassigned"
This (below) doesn't work, and I get the error: "This formula uses scope, which is not presently supported for evaluation."
If(IsBlank(ThisItem.'Assigned To'), "Unassigned", ThisItem.'Assigned To')
But this works fine...
If(IsBlank(ThisItem.'Assigned To'), "Unassigned", "Assigned")
When I say it works fine, I mean it does evaluate correctly, using the appropriate text. So I conclude my datasource is properly connected (it is because I can pull other data) and that my formula syntax is correct.
In the same label ThisItem.'Due Date' works fine, but ThisItem.'Assigned To' fails.
I thought it might be something to do with some records being blank, but that's not it.
Thoroughly lost.
Thanks for looking.
Since I did answer and respond first.. lets try again.
The LookUp cannot put in the value, because the LookUp as I described is a Record/Table, not a Property on an Entity/Table.
So it has no idea what Property you want. Secondarily its a Multi-Person, which is why i said you needed to Concat them together INTO a string, because all you get is a Pointer to a Group of Records not a specific property ON any of those records.
Think of it like this. Where would it pull the "value" too in your table? There is no Columns for it to store anything but the (as you called it Link). There are potentially dozens of properties on a Column so yeah thats how LookUps work. It gets even more complicated if its polymorphic
Cheers
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
OK, that did it... but I guess I'm confused. Maybe.
I expected the lookup would pull in the value from Contact to Tasks, instead it just maintains that link? So, it marries the lookup table column rather than pulling it in?
Hi @STS1SS,
'This formula uses scope, which is not presently supported for evaluation' is not an error but rather a notification that the editor cannot evaluate the line of code because it uses the scope of e.g. a gallery or form.
The actual error in your code will be occurring since ThisItem.'Assigned To' does not return a Text value as is expected within the Text property of a label. Since the column is a LookUp to a contact table, you will need to append that line of code with the column you wish to display. (Below an example)
If(
IsBlank(ThisItem.'Assigned To'),
"Unassigned",
//Change to correct column name
ThisItem.'Assigned To'.FirstNameColumn
)
//Shorter alternative
Coalesce(
ThisItem.'Assigned To'.FirstNameColumn,
"Unassigned"
)
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!
Hi,
Is your Assigned to MultiPerson? If so I would use IsEmpty not IsBlank, which might be causing your issue.
This happens specifically because it cannot be evaluated because the Gallery itself either isn't selected (so it doesn't have context to ThisItem, or there is no data, in which case, its not really an error but possible you have put it into a Property(like a Text) of a Label where because its a Table of values and not a Record, you cannot do what your asking it to do.
So for the Text if its a single person, then get the Display Name, if its a Multi, then you need to Concat(ThisItem.'Assigned To'.DisplayName,",")
sorry not at my normal computer so Im typing instead of code.
Cheers
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional