Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

Setting a variable from ModelDriveFormIntegration during OnVisible



I'm building an embedded canvas app that performs several lookups when certain screens load.  To avoid typing [@ModelDrivenFormIntegration].Item.EntityId every time I need to do a filter or lookup, I am attempting to set a variable Set(varEntityId, [@ModelDrivenFormIntegration].Item.EntityId) as the first line in the OnVisible method.  However, the varEntityId is always empty.  Therefore, the only way my LookUps work is if I always type out the entire text: [@ModelDrivenFormIntegration].Item.EntityId

Is this by design or am I missing something?  Seems weird that you wouldn't be able to set a variable with the Id passed in via  ModelDrivenFormIntegration.


Thanks for the help,


New Member

I was into the similar situation with your's and there's a clue found by my colleague hope can help you to fix this problem by yourself,which The screen OnVisible property had been triggered before [@ModelDrivenFormIntegration] be read.

So in the case of embedded canvas app,Setting a variable during OnVisible from ModelDriveFormIntegration,value of varEntityId might be always empty if you don't load this screen again.

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (5,172)