cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chaitanyaChavan
Level: Powered On

Validate combobox for default selected items is not blank

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Validate combobox for default selected items is not blank

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:8.JPG

 

9.JPG

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:Test1.gif

 

More details about set a Default value for a Choice type column of SP list within Edit form, please check the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/Set-default-value-for-a-drop-down-in-a-new-fo...

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

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Validate combobox for default selected items is not blank

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:8.JPG

 

9.JPG

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:Test1.gif

 

More details about set a Default value for a Choice type column of SP list within Edit form, please check the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/Set-default-value-for-a-drop-down-in-a-new-fo...

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

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,418)