web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Way to access PCF inpu...
Power Apps
Answered

Way to access PCF input type fields in Form JS

(0) ShareShare
ReportReport
Posted on 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

I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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,

  • jhashwani Profile Picture
    18 on at

    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  

  • v-xida-msft Profile Picture
    on at

    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,

  • Hemant Gaur Profile Picture
    on at

    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 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard