cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Nikhil2
Level 8

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
Nikhil2
Level 8

Re: Cannot Patch dropdown from gallery

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

Nikhil2
Level 8

Re: Cannot Patch dropdown from gallery

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
Nikhil2
Level 8

Re: Cannot Patch dropdown from gallery

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

Nikhil2
Level 8

Re: Cannot Patch dropdown from gallery

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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,559)