
Announcements
I am trying to validate the combobox default selected items,
When they select the items in the new form, they are concatenated and stored in the form of string in SQL column,
and when they try to edit that, it is split from a label as default selected items and it displays the default list.
When in the edit form, I am not able to validate the comboxbox though. Since it just validates for selected items and not default selected items.
Can anyone help me out on how to check if the combobox is null for default selected items?
Hi @chaitanyaChavan,
Do you want to check if the Default selected items of the Combo box control is blank?
How do you set the DefaultSelectedItems property within the Combo box control?
If you want to check if the Default selected items of the Combo box control is blank, I have made a test, please take a try with the following workaround:
Set the DefaultSelectedItems property of the Combo box control to following formula:
If(
EditForm1.Mode=FormMode.New,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value:"Default Value" /* <-- Set default value */
},
Parent.Default
)
Set the Text property of the Label control to following formula:
DataCardValue5.Selected.Value
Note: The DataCardValue5 represents the Combo box control within my Edit form.
If you have set the DefaultSelectedItems property of the Combo box control as I mentioned above, then when you open a new form, you could use the following formula to check if the Default selected items is blank:
If(IsBlank(DataCardValue5.Selected.Value),"Blank","Not Blank")
The GIF screenshot as below:
More details about set a Default value for a Choice type column of SP list within Edit form, please check the following thread:
Please also check and see if the following blog would help in your scenario:
https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/
Best regards,
Kris