Notifications
Announcements
Is it possible to get the form name which the PCF control is embedded within via the context object?
Thanks
Hi @SP123456
you can get FormContext from executioncontext ...
ExecutionContextObj.getFormContext()
and then many be get current form as below..
formItem = formContext.ui.formSelector.getCurrentItem();
and then can access form label like formItem.GetLabel()
refer following article for more information
https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/formcontext-ui-formselector
Hope this helps..
HI @SP123456 ,
even if you get the name of the form somewhere in the PCF context, it would be unuspported.
The supported way would be to add a dummy field to your PCF (something like "formName") and use form scripting to grab the form name (as @MayankP suggested) and set that value for a dummy column associated with the PCF "formName" property.
Hope this helps!
Thanks @MayankP
Thanks for this @DianaBirkelbach, I will give it a go.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268