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

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

Highlighted
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
secondImage

Community User Group Member Badges

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

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!

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