Hi all,
I’ve been working with a canvas app embedded inside a model-driven app. I’m trying to retrieve a record from my Dataverse table 'MDA Approvals'
using the GUID of the current record from ModelDrivenFormIntegration
.
This code works correctly and returns the expected record, but throws a delegation warning:
To avoid the delegation warning, I tried switching to a pure GUID comparison:
But strangely, this version does not return any record — even though the values should match.
To verify this, I tested in a label:
This returns true
, which confirms that both IDs match.
So my question is:
Why does the LookUp()
using GUID(...)
not return a record?
Is there a reliable way to write this that avoids delegation warnings and actually returns results?
Thanks in advance for any insights!
GP
With(
{ MyID: First(ModelDrivenFormIntegration.Data).ItemId },
Set(
varApprovalRecord,
LookUp(
'MDA Approvals',
Text(Approvals) = MyID
)
)
)
Since GUID() is non-delegable in Dataverse queries in PowerApps. Static GUID values or variables are fine — Dataverse can evaluate them server-side.
With(
{ MyID: GUID( First(ModelDrivenFormIntegration.Data).ItemId ) },
Set(
varApprovalRecord,
LookUp(
'MDA Approvals',
Approvals = MyID
)
)
)
Hi GP,
The root cause is that Canvas Apps treat GUID comparisons differently from Dataverse behind the scenes. Specifically:
Approvals
column in Dataverse is likely a lookup or a GUID-type column, but Canvas Apps interprets it differently depending on how the record is referenced.GUID(First(ModelDrivenFormIntegration.Data).ItemId)
, Canvas Apps treats this as a GUID type, but in Dataverse, lookup fields are objects, not just GUIDs.
So this query: LookUp('MDA Approvals', Approvals = GUID(...)) - doesn't match because Dataverse internally treats lookup columns as records, not plain GUIDs.
With(
{ MyID: GUID( First( YourDatasource ).ItemId ) },
Set(
myVar,
LookUp(
'MDA Approvals',
Approvals.Id = MyID
)
)
)
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1