cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Cannot Patch dropdown from gallery

Hello Team,

 

Here i have issue regards with patch from gallery dropdown to Sharepoint.

 

1. Below is the code which i am using to patch the gallery dropdown. And one with bold value the hiccup to patch the dropdown, could anyone help me to solve this issue. It says "Does not match the expected type Record Found Type Text"

2. Before that i am using a gallery(gallery2) and i have 2 textboxes and one dropdown.

3. I am collecting the data to collection"ProjectE", luckily everything works fine with patching the values to sharepoint. Unfortunate the dropdown is causing the trouble.

 

Patch(ProjectE,ThisItem,{Description:TextInput5.Text,Amount:TextInput6.Text,Expense:Dropdown1.Selected.Value,ShowAddButtons1: false});Set(NeedsSaved1, false);If(!IsBlank(TextInput5.Text),true,Notify("Description, Cannot be blank",NotificationType.Error));If(!IsBlank(TextInput6.Text),true,Notify("Amount, Cannot be blank",NotificationType.Error));ForAll(ProjectE,If(!IsBlank(Description),Patch('04. Project Expenses',Defaults('04. Project Expenses'),{Title:DataCardValue198.Text,Expenses_x003a_: Description,Amount:Value(Amount),Expense_x0020_type_x003a_: Dropdown1.Selected.Value,Report_x0020_Month_x002f_Year_x0:DataCardValue204.Text,Project_x0020_Category:DataCardValue205.Text,Created_x0020_Date0:DataCardValue206.SelectedDate})));If(!IsEmpty(TextInput5.Text),UpdateContext({Visible1:true}),UpdateContext({Visible1:false}));ClearCollect(ProjectE, {Description:"",Amount:"",Expense:""})

 

Thanks in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Resolver II
Resolver II

Even i have tried with the other patter Expense_x0020_type_x003a_: Dropdown1.Selected but seems to be no luck, when it collecting the data. It clear with the dropdown for ex: when i select 1 from the first row and 2 from second row collection is saving the both the values.

 

But when it is patching the values to the sharepoint it patching "1" to both the columns.

 

 

View solution in original post

Highlighted
Resolver II
Resolver II

Hello Team,

 

I have found the solution for the below patch function.

 

ForAll(ProjectE,If(!IsBlank(Description), i have noticed that i have used collection instead of "Gallery.Allitems". Now the problem seems to be solved.

 

Thank you

 

View solution in original post

2 REPLIES 2
Resolver II
Resolver II

Even i have tried with the other patter Expense_x0020_type_x003a_: Dropdown1.Selected but seems to be no luck, when it collecting the data. It clear with the dropdown for ex: when i select 1 from the first row and 2 from second row collection is saving the both the values.

 

But when it is patching the values to the sharepoint it patching "1" to both the columns.

 

 

View solution in original post

Highlighted
Resolver II
Resolver II

Hello Team,

 

I have found the solution for the below patch function.

 

ForAll(ProjectE,If(!IsBlank(Description), i have noticed that i have used collection instead of "Gallery.Allitems". Now the problem seems to be solved.

 

Thank you

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,480)