Hello,
I am trying to use a button to set the defaultselecteditems to be one of the choices within my combobox. This works fine on all of my other comboboxes except for one. The one I am using is the content type choices from my datasources. Does anyone know how to fix this? Here are my screenshots.
Thanks
You didn't say which specific default values should show in the dropdown so I will give a general answer...
I think the problem is being caused by having 2 arguments in your Choices function. Choices only accepts a single argument.
Set(contentvar, Choices('Accident & Incident Database'.'Content type', "Fire Report"))
You can supply only one argument, not both.
Set(contentvar, Choices('Accident & Incident Database'.'Content type'))
Set(contentvar, ["Fire Report"])
Also, make sure the MultipleSelect property is set to True if you want to allow more than one selection.
If this does not help, please provide more info.
---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."
Thank you. I was assuming that I had to reference the Choices of the SharePoint column before I told it which option to take but when I have tried to second option it looks to have worked.
Cheers
@mdevaney on close inspection this hasn't worked. When the data passess to SharePoint it is always taking "Accident Record". When I use the Set in the form it looks fine but when I submit it always take the first value.
Do you think this is because I am using the content types rather than just a standard choices column?
Yes, I agree this is because you are using content types rather than a standard choices column. Unfortunately, I am not familiar with working on SP content types in PowerApps.
User | Count |
---|---|
209 | |
94 | |
84 | |
49 | |
39 |
User | Count |
---|---|
264 | |
104 | |
104 | |
61 | |
59 |