cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
k_cain
Helper II
Helper II

Reset to Blank upon Patch to SharePoint

Hi,

I have a data card that is patched to SharePoint upon clicking the Save button. When a user selects an FHA Number from a dropdown menu, the Property Name field auto populates with the corresponding data (from another SharePoint list). The Save button has a formula that should reset all fields back to blank after submitting. The Default property for the Property Name field is 'FHA Number_Dropdown'.Selected.Title, so why is it reverting to Mecca III Apartments?

 

The OnSelect property for the Save button is as follows: 

Patch('Construction Analyst Workload Management', Defaults('Construction Analyst Workload Management'), {Title:'Construction Request New Entry', 'FHA Number_Label': 'FHA Number_Dropdown', 'Date Logged In_Label': 'Date Logged In_Input', 'Date Email Received_Label': 'Date Email Received_Input', 'Request Type_Label': 'Request Type_Dropdown Input', 'Request Item Number_Label': 'Request Item Number_Input', 'Due Date_Label':'Due Date_Autogenerated', 'Property Name_Label': 'Property Name_Text_Input', Completed_Label: Completed_Toggle, 'Date Request Sent to Lender_Label': 'Date Request Completed_Input', Comments_Label: Comments_Input});


Reset('FHA Number_Dropdown'); Reset('Date Logged In_Input'); Reset('Date Email Received_Input'); Reset('Request Type_Dropdown Input'); Reset ('Request Item Number_Input'); Reset('Due Date_Autogenerated'); Reset('Property Name_Text_Input'); Reset(Completed_Toggle); Reset('Date Request Completed_Input'); Reset(Comments_Input)

 

k_cain_0-1610487824345.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

@k_cain ,

I am simply trying to get rid of the item if there is nothing in the drop-down - I also use this one a bit

If(
   Len(FHA Number_Dropdown'.Selected.'FHA Number')>0,
   FHA Number_Dropdown'.Selected.Title,
   Blank()
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

12 REPLIES 12
WarrenBelz
Super User III
Super User III

Hi @k_cain ,

One possibility is the Macca III Apartments has a blank field in the matching list item, so try this first

If(
   !IsBlank(FHA Number_Dropdown'.Selected.Title),
   FHA Number_Dropdown'.Selected.Title,
   Blank()
)

If this is not the case, it may be a sequence of events issue, but we will do this next if necessary.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Drrickryp
Super User II
Super User II

Hi @k_cain 

You have to AllowEmptySelection  true in the dropdown and set the Default property to Blank().

I think I figured out what's going on. The SharePoint list has blank values and is causing the FHA Number dropdown to reset to the first Property Name with a blank FHA Number. How can I filter out any blanks in the the Items property of FHA Number?

k_cain_0-1610490600534.png

 

Drrickryp
Super User II
Super User II

SortByColumns(Filter('A-MAP',!IsBlank(FHA_x0020_Number),"FHA_x0020_Number").

@k_cain ,

That was exactly what I posted - occasionally my guesses are correct.

@Drrickryp 's code is what you need to do the filter.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

For some reason, that formula is not working.  Whenever I click the Save button to reset the form, it shows the first item with a blank FHA Number in the SharePoint list.  I want to exclude those first two files (1st screenshot) from the FHA Number dropdown.  Any ideas for how this may be done?

k_cain_0-1610647524796.png

k_cain_1-1610647610985.png

 

@k_cain ,

That is why I suggested this in my post as the Default of the Text box

If(
   !IsBlank(FHA Number_Dropdown'.Selected.Title),
   FHA Number_Dropdown'.Selected.Title,
   Blank()
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Warren, no luck with that either. Even with that formula in the Default property of the Property Name field, the reset (Save) button continues to show data in the Property Name box. Also, I noticed that the FHA Number dropdown has added new blanks? Any ideas for how to correct this problem? I'm at a loss.

k_cain_0-1610656490644.png

 

@k_cain ,

Actually I have the wrong field there in the logic - replace Title in the first part with whatever the drop-down value actually selects.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,123)