cancel
Showing results for 
Search instead for 
Did you mean: 

From control configuration : Allow input value for TwoOptions property

Currently, it is only possible to bind an attribute to a TwoOptions property. 

It would be nice to allow customizers to use a value of their choice

Status: Under Review

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>

 

I will mark the idea as under review and not resolved so that we can see if there is interest inmaking this first class.

 

 

Comments
Power Apps
Status changed to: Under Review

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>

 

I will mark the idea as under review and not resolved so that we can see if there is interest inmaking this first class.

 

 

Advocate III

Hello,
I tried to implement the Enum property above but I had some pretty strange behaviors.


When building the component I had an error on the hidden property saying that: "hiddent exists in instance when not allowed".

 


I tried removing this property but as soon as I installed the solution I didn't see any available components (or even standards).


I don't know if I missed anything.

 

Frequent Visitor

Hi,

 

try to remove 'hidden' prop, like this:

 

<property name="EnableFiltering" display-name-key="CC_Allow_Filtering" description-key="CC_Allow_Filtering_Desc" usage="input" of-type="Enum" required="false">
<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>

for me it works 🙂

 

Hope it helps 

Regular Visitor

Hello, I will use the same workaround, but it seems that you must implement the possibility of using the twoOption type, as I am just following the documentation and not the forums... it's a Lil bit disappointing to see that there are "known issues" like this one and it remains open a lot of time... move on Team!!!

Regular Visitor

I'm trying to implement the TwoOptions input parameters as input config values for a "BoundedDatepicker" using the datepicker from the FluentUI:

 

This is my "config" window and i was trying to use the TwoOption input Type to let the user enable or disable the PCF features: 

 
 

image.png

 

But when I tried to configure my TwoOption Input parameters I just can bind it to a field but actually it cannot contain a static value, if I set the default value using the manifest XML:

 

<property 
	name="restrictMinimunDate" 
	display-name-key="i_restrictMinimunDate" 
	description-key="Property_Desc_Key" 
	of-type="TwoOptions" 
	usage="input" 
	required="true" 
	default-value="0"
/>

 

 then I get this error trying to use my PCF: 

 

 

 <Message>Property showWeekNumbers is configured as a static value and can�t be declared as TwoOptions</Message>

 

 

 

Please, let us use the standard types and avoid to do workarounds.

 

Thanks. 

Regular Visitor

Due this workaround i will need to change my entire code logic to read the Enum property instead a BOOLEAN property... 😞 

 

image.png

Regular Visitor

due to this workaround, I will need to update the entire code logic to read the Enum property instead of a twoOptions (boolean) property 😞 

 

image.png

Advocate I

Same here. Using the Enum workaround for now, but I would definitely prefer to be using native booleans. This would bring parity between model-driven apps and canvas apps.

Also, Enums are limited to static values, they can't be bound. So currently, it is impossible to have a True/False property with the flexibility of being bound or being set statically.