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

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

Nikhil2 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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

Top Solution Authors
Top Kudoed Authors
Users online (6,025)