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

Send empty value in search column of a sharepoint list

Hello,

 

So here's my situation:
I have a powerapps application with a sharepoint site as data source.
In this site, I have a sharepoint list with a search column.
Then in my powerapps application, I have a drop-down list (which is for this search type column) with another drop-down list that depending on the value of the latter (Yes or no) hides or not the drop-down list of the search type column.
What I would like to do and this is my difficulty, it is when my drop-down list for my search column is hidden and I realize a SubmitForm, I would like this one to return an empty value to my sharepoint list which is currently not the case (the SP list always keeps the old value regardless of the value of the field that dictates visibility).

 

Thank you in advance for your answers,

 

Have a good day

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send empty value in search column of a sharepoint list

Hi @rubis ,

Do you want to set a Default value within the Search Type Dropdown box when you hide the Search Type field Data card?

 

If the Search Type Dropdown box is a Dropdown control, please set the Default property of the Search Type Dropdown control to following:

 

If(
SearchTypeColumnDataCard.Visible = false,
"Specific Search Type Value"
)

 

 

If the Search Type Dropdown box is a ComboBox control, please set the DefaultSelectedItems property to following:

 

If(
SearchTypeColumnDataCard.Visible = false,
{ Value : "Specific Search Type Value" }
)

 

 

Set the Update property of the Search Type column data card in your Edit form to following:

{
  Value: SearchTypeDropdown.Selected.Value
}

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

6 REPLIES 6
FacundoGorla
Level: Powered On

Re: Send empty value in search column of a sharepoint list

Hi! Had the same problem a while ago where I made a certain selected option from a dropdown to put empty value on a choice column in SP.

 

To be able to save that change and not reverted to parent.default you have to enable "Formula level error administration" in advance configuration, experimental features. I don't know if those are the exact names since I use the spanish versions! 

 

Once that option is enabled you can save empty values in the Sharepoint columns.

rubis
Level: Powered On

Re: Send empty value in search column of a sharepoint list

Thank you for your answer @FacundoGorla ,

 

I checked this parameter but I don't have any more successes. So, how did you assign empty the drop-down list you wanted to empty in your Sharepoint list ?

FacundoGorla
Level: Powered On

Re: Send empty value in search column of a sharepoint list

I put Blank() as the dafault selected value of a date column whenever a radio button option was "no".
Once I enabled the advance setting I mentioned it started to work fine saving the value as empty and erasing previous data.

 

If(Radio1.Selected.Value = "No"; Blank(); Parent.Default)

That's the DefaultDate value.

 

Since yours is a Choice column maybe you have to check the "able to add manual values" or whatever it's names is the option that enables you to add values that aren't the choices. This is in the edit of the SharePoint column.

 

Another way around is to create a choice named "nothing" "empty" or whatever you want to use it as blank.

Community Support Team
Community Support Team

Re: Send empty value in search column of a sharepoint list

Hi @rubis ,

Which type column do you use to store the Search Type Dropdown list value in your SP List? Single text type column or Choice type column?

Do you want to send a Blank value back to your SP List when the Search type column data card is hidden in your Edit form?

 

I have made a test on my side, please consider take a try with the following workaround:

Firstly, please turn on the "Formula-level error management" option within Advanced settings of App settings of your app.

Set the Visible property of the Search Type column Data card in your Edit form to following:

 

If(AnotherDropdown.Selected.Value = "Yes", true, false)    /* <-- control the Search Type column data card visible based on the selected value in another Dropdown list */

 

Set the Update property of the Search Type column data card in your Edit form to following:

1. If you use Choice type column to store the Search Type Dropdown list value:

 

If(
    SearchTypeColumnDataCard.Visible,
    {
      Value: SearchTypeDropdown.Selected.Value
    },
    {
       Value: Blank()
    }
)

2. If you use Single text type column to store the Search Type Dropdown list value:

If(
    SearchTypeColumnDataCard.Visible,
    SearchTypeDropdown.Selected.Value
    Blank()
)

Note: The SearchTypeColumnDataCard represents the the Search Type field data card in your Edit form, which contains the Search Type column Dropdown list.

 

More details about writing Blank value back to Choice type column in SP List, please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

 

 

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.
rubis
Level: Powered On

Re: Send empty value in search column of a sharepoint list

Thank you all for your answers,


@v-xida-msft 

 

To answer your questions, I was using a choice column in my Sharepoint list and indeed, I wanted that when my data card that contained the search type drop-down list was mask, it returns an empty value to my Sharepoint list.
What you posted and explained works perfectly on my side I thank you very much.

 

Alternatively, I would like to ask a question about another solution to the problem. In the same context as before, let's imagine that instead of sending an empty value to my SharePoint list, I want to send a precise choice of my search type column drop-down list. How do I specifically designate a choice from the search column drop-down list to be sent as before when my search column drop-down list is hidden?

Community Support Team
Community Support Team

Re: Send empty value in search column of a sharepoint list

Hi @rubis ,

Do you want to set a Default value within the Search Type Dropdown box when you hide the Search Type field Data card?

 

If the Search Type Dropdown box is a Dropdown control, please set the Default property of the Search Type Dropdown control to following:

 

If(
SearchTypeColumnDataCard.Visible = false,
"Specific Search Type Value"
)

 

 

If the Search Type Dropdown box is a ComboBox control, please set the DefaultSelectedItems property to following:

 

If(
SearchTypeColumnDataCard.Visible = false,
{ Value : "Specific Search Type Value" }
)

 

 

Set the Update property of the Search Type column data card in your Edit form to following:

{
  Value: SearchTypeDropdown.Selected.Value
}

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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 Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,478)