cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Checkbox Input in Form Collection

I am new to PowerApps. My App is collecting information from our employees to evaluate our Contractors performance. Everything is being run through CDS/Dataverse. One of the questions offers multiple choices in the form of Checkbox inputs.

 

Capture1.JPG

 

Once the checkboxes are checked, how do I save that data/input to the Dataverse? What command or language should be entered on the OnCheck & OnUnCheck lines? How do I connect each box with the Choices I have in my Dataverse Table? I have scoured the internet looking for the answer, but it seems I can only find stuff on linking to SharePoint. I am trying to do this 100% in the Dataverse.

 

If this is common knowledge stuff, please forgive a newbie trying to learn.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@Urbain_Mora,

Do you mean that you want to save Checkbox value to the Choices field in the CDS?

A Choices field could not be used to compare with a Text value, this is forbidden by PowerApps. If I understand correctly, you have a Choices field and you want to display this options using multiple Checkboxes.

A key is that it is difficult to convert the Text to OptionsetValue which is forbidden by PowerApps.

For your needs, I think it over and update the reply as below.

 

 

Here is an alternative solution, I think you could consider a horizon Gallery to insert Checkbox values into the Choices.

Add a blank horizontal Gallery outside the form and insert a Checkbox into it.

Set Items property of the Gallery as:

Choices(QiTests.Check)

Set Text property of the Checkbox as:

ThisItem.Value

Set Default property of the Checkbox as:

If(Checkbox11.Text in ThisItem.Value, true, false)

Set Update property of the data card corresponding to the Check column as:

Filter(Gallery6.AllItems,Checkbox11.Value)

Note: My table name is 'QiTests' and my Choices column is 'Check'.

Then you just need to click the submit button to save the choices back to the Table.

Hope it could help.

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

Hi @Anonymous 

Checkbox controls are saved as either true or false.  If your have a series of choices that are mutually exclusive, then use a radio control. If can choose more than one, consider a list box or combobox, depending on the number of choices. They allow multiple choices.

v-qiaqi-msft
Community Support
Community Support

Hi@Urbain_Mora,

Do you mean that you want to save Checkbox value to the Choices field in the CDS?

A Choices field could not be used to compare with a Text value, this is forbidden by PowerApps. If I understand correctly, you have a Choices field and you want to display this options using multiple Checkboxes.

A key is that it is difficult to convert the Text to OptionsetValue which is forbidden by PowerApps.

For your needs, I think it over and update the reply as below.

 

 

Here is an alternative solution, I think you could consider a horizon Gallery to insert Checkbox values into the Choices.

Add a blank horizontal Gallery outside the form and insert a Checkbox into it.

Set Items property of the Gallery as:

Choices(QiTests.Check)

Set Text property of the Checkbox as:

ThisItem.Value

Set Default property of the Checkbox as:

If(Checkbox11.Text in ThisItem.Value, true, false)

Set Update property of the data card corresponding to the Check column as:

Filter(Gallery6.AllItems,Checkbox11.Value)

Note: My table name is 'QiTests' and my Choices column is 'Check'.

Then you just need to click the submit button to save the choices back to the Table.

Hope it could help.

Regards,

Qi

 

Best Regards,
Qi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,083)