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 / Complex Object as inpu...
Power Apps
Unanswered

Complex Object as input parameter to PCF

(0) ShareShare
ReportReport
Posted on by 8

Hi 

Currently PCF input parameters allow only basic key value pair as input with standard data type.

Is there way I can accept complex object as input parameter? Certainly, I can pass JSON as input but that wont be a intuitive user experience. Is there designer experience for complex property?

thanks

-san

I have the same question (0)
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    At the moment there is no way to pass anything more complex than whole number, string or something similar so... you will have to be creative. I believe that string input plus JSon can do whatever you need.

    Good luck.

  • Ben Thompson Profile Picture
    1,400 on at

    @a33ik Provided the serialized JSON object is less than 100 characters long as I don't think that issue has been fixed yet.

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @ben-thompson ,

     

    I think @a33ik means string inputs for the name of a WebResource where a JSON can be placed.

     

    An alternative would be a string property with the name of an Environment Variable (but I think it's still in Preview).

     

    @sandeep_rp1 It depends what you need to configure in the JSON. For some cases it could work when you use a few properties with standard data type, instead of one property. The values doesn't have to be fields, it can be Enums or static values.

     

    Best regards,

    Diana

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    @ben-thompson @DianaBirkelbach actually it can be both - passing of configuration itself (if it's small considering the limitation of 100 symbols for string inputs) or reference to configuration webresource that could be retrieved from the code of PCF.

  • cchannon Profile Picture
    4,702 Moderator on at

    OK, so not offering anything really new here, just restating what has already been posted in a way that more directly answers @sandeep_rp1 's question:

     

    Yes, you can come up with a more user-friendly solution, if you are ready to put in a bit of work. Because you can pass string variables of any content, you could, for example, pass an XML resource URL or a GUID for a CDS record; whatever you want to use to store your full config.

     

    To make it user-friendly, you might create a custom entity called "PCF Config" and add to it fields that represent the config you want folks to be able to control. So, your PCF loads, then the first thing it does is use the WebAPI (assuming you're deployed in a model-driven app) to call that record and retrieve its config.

     

    In fact, you could have the config be user-specific and never pass any string to the PCF; just query for the config record owned by the current user, then default to some set of params if they haven't set up any user preferences. That would make for a pretty good user experience. The caveat to that would be user counts. If your deployment has 40K users, the UI experience might be sluggish if it has to query and page through all those results, but if you only have a couple thousand users, it should be plenty quick enough as long as you <>.filter() the results and don't try to loop through them.

  • Community Power Platform Member Profile Picture
    on at

    Hi,

    It's a long shot but, do you have any example for this solution I could use?

    Thanks

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard