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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,668)