cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DianaBirkelbach
Super User
Super User

PCF Harness: Default Values for OptionSet control

When we develop a PCF OptionSet Control, we get always 3 options available: "Option A / Option B / Option C".

Is there a possibility to define another values?

I would need some more flexibility: more options, long text for options, different content, specify color for the options, aso.

I would implement my own default values, but since the 3 values are always returned, I don't know when to overwrite them with my own values.

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

Hi @DianaBirkelbach ,

Do you want to set the option set's value by your own?

You can acheive the same by using type ‘enum’  as following - 

 

A sample property l

    <property name="EnableFiltering" display-name-key="CC_Allow_Filtering" description-key="CC_Allow_Filtering_Desc" usage="input" of-type="Enum" required="false" hidden="true">

      <value name="Yes" display-name-key="CC_Enable_Filtering" description-key="CC_Enable_Filtering_Desc">yes</value>

      <value name="No" display-name-key="CC_Disable_Filtering" description-key="CC_Disable_Filtering_Desc" default="true">no</value>

    </property>

 

 

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/From-control-configuration-Allow-input-value-fo...

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft ,

thank you for the fast answer. I'm not sure if we talk about the same problem. I'm looking for a way to set the available optionset values for test inside the harness, not to configure an Enum-parameter for the form customization.

I've attached a screenshot to show what I mean.

I'm not sure how to bind the Enum parameter with my OptionSet bound parameter?

 

Best regards,

Diana

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
HemantG
Power Apps
Power Apps

Providing custom values is not supported in the test harness. Please log feature request/idea on https://aka.ms/PCFIdea

 

Hemant 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,576)