cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
navneet_singh
Level: Powered On

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
Power Apps Staff HemantG
Power Apps Staff

Re: Can PCF Component take values from hidden fields?

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
Level 8

Re: Can PCF Component take values from hidden fields?

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.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Users online (6,330)