cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ben22
New Member

Creating a save button in a gallery with a look up

Hi, how do I create a save button when there is a look-up? The look-up is in a text input box. I was able to make the toggle work with the look-up, but I can not get the save button to work. I currently have this equation for the save button:

ForAll(Filter(Gallery1.AllItems,Toggle1.Value = true), Patch('Data Source',ThisRecord, {'Name': InputName.Text, Location: InputLocation.Text, 'Age':InputAge.Text} ))

I have tried Defaults instead of ThisRecord which did not work either.

The Location is the look-up from Dataverse. How I got it to pull from the Dataverse was by this equation: ThisItem.Location.'Location Abbreviation'. When I try to do ForAll(Filter(Gallery1.AllItems, Toggle1.Value = true), Patch('Data source', ThisRecord,{Name: InputName.Text, Location.'Location Abbreviation: InputLocation.Text, Age: InputAge.Text} ) it does not work either.

Thank you!

2 REPLIES 2
Drrickryp
Super User
Super User

@ben22 

You could try 

Patch('Data Source',ThisItem, {'Name': InputName.Text, Location: InputLocation.Text, 'Age':InputAge.Text}
Or
Patch('Data Source',Lookup('Data Source',ID=ThisItem.ID), {'Name': InputName.Text, Location: InputLocation.Text, 'Age':InputAge.Text}

Is there an additional way to do it? 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,463)