cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
navneet_singh
Frequent Visitor

Can PCF Component take values from hidden fields?

I have a field named "URL" in my form. The field is hidden in the form. The value in the field gets auto populated through a workflow. I have a PCF Component that must take the url from "URL" field (which is hidden in the form) and open the url in a new window. Is this possible?

2 REPLIES 2
HemantG
Power Apps
Power Apps

Haven't checked as such but I believe hidden fields are not attempted to render whether OOB or custom PCF. You can hide label and not render anything and place these at end of some section so that visually it does not take space (there are some borders etc because of field section item). On the control init you can use the open URL method to launch the url.

Alternatively same openURL client API can be used and attached to form load event.

Hemant
ben-thompson
Solution Sage
Solution Sage

Why does it need to be a PCF? Given the fact the URL will be opened in a new browser window, surely it's better for that logic to be in a Javascript function attached to the onchange trigger of the hidden field.

 

This seems to be a case of creating something for the sake of it while adding weirder potential support issues.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,130)