Skip to main content

Notifications

Community site session details
Power Apps - Power Apps Pro Dev & ISV
Answered

Way to access PCF input type fields in Form JS

Like (0) ShareShare
ReportReport
Posted on 7 May 2020 01:49:56 by 18

HI Folks,

 

Wondering, if there is way to extract "input" type parameter value(s) from PCF control on Form Javascript? 

 

Any help is appreciated!! 

 

Jai

  • Hemant Gaur Profile Picture
    on 13 May 2020 at 18:04:48
    Re: Way to access PCF input type fields in Form JS

    Type input for the control by definition is input only to control and not something which can be accessed outside . We have output property in roadmap which will help pass the property back to the environment. Dont use the direct DOM manipulation, for short term you can try using bound property which can be accessed using ClientAPI. 

     

    hemant 

  • v-xida-msft Profile Picture
    on 08 May 2020 at 01:59:58
    Re: Way to access PCF input type fields in Form JS

    Hi @jhashwani ,

    Yeah, based on the needs that you mentioned, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    If you would like this feature to be added, please consider submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

     

    Also please take a try with above alternative solution I provided, then check if it could help in your scenario. If it could achieve your needs, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

  • jhashwani Profile Picture
    18 on 08 May 2020 at 00:35:01
    Re: Way to access PCF input type fields in Form JS

    Hi @v-xida-msft,

     

    I was referring to PCF input type field that gets defined in manifest file. Thanks for your reply though. Appreciate it!

     

    Jai  

  • Verified answer
    v-xida-msft Profile Picture
    on 07 May 2020 at 07:44:07
    Re: Way to access PCF input type fields in Form JS

    Hi @jhashwani ,

    Could you please share a bit more about your scenario?

    Do you want to access the Input Type field of a PCF control in your Model-Driven app form?

     

    If you want to extract the "input" type parameter value(s) from PCF control in your Model-Driven form using JavaScript, I afraid that there is no way to achieve your needs.

    Currently, within PCF control, the "Input" parameters defined within the ControlManifest.Input.xml file would not be exposed as HTML DOM Element in browser, so you could not use JavaScript code to select/extract the "input" type parameter value(s).

     

    If you attach a Id selector property to the PCF control, you could get the value of the PCF control through the Id selector property:

    7.JPG

    When you add your PCF control in your Model-Driven app form, the PCF control would be rendered as a normal HTML DOM Element like above screenshot:

    <input type="range" max="100" min="1" class="linearslider" id="linearrangeinput">

    If you want to get the value from the PCF control, you could extract the corresponding value based on the id selector using the the following JS Code:

    var pcf_value = document.getElementById("linearrangeinput").value

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 55 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 49 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 31 Super User 2025 Season 1

Overall leaderboard