cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
Resolver II
Resolver II

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

Highlighted
Resolver II
Resolver II

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
Highlighted
Resolver II
Resolver II

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

Highlighted
Resolver II
Resolver II

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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