cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Gallery(based on sql view) to EditForm(based on table)

hi,

I'm building a powerapps application with sql server as the database and I have a question about using an sql view in the gallery screen that then navigates to an editform that is based on a table.

 

The problem with this is that the gallery view has a different structure to the table used in the editform thus when pass selected record between the two you have a problem. (note the sql view is based on the same table used in the editform but with the foriegn key descriptive names from the related tables.eg Invoice sql view including customer name from customer table).

 

Is there a way to get around this problem as using views in gallery screen seems like a good idea, atleast at first.

 

thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Gallery(based on sql view) to EditForm(based on table)

Hi @Anonymous,

 

Please consider switch the item property of the form control to the lookup function.

 

For example:

Lookup(ActualTable, PrimaryID=Gallery.Selected.ID)

See if that would work.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Gallery(based on sql view) to EditForm(based on table)

Hi @Anonymous,

 

Please consider switch the item property of the form control to the lookup function.

 

For example:

Lookup(ActualTable, PrimaryID=Gallery.Selected.ID)

See if that would work.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: Gallery(based on sql view) to EditForm(based on table)

Thanks for the reply. Was a simple solution.

 

Have just been searching for an answer to a related issue.

Are we able to change the value in the Gallery.Selected property?

I want to be able to control the selected record in the gallery.

 

thanks.

 

 

Community Support Team
Community Support Team

Re: Gallery(based on sql view) to EditForm(based on table)

Hi @Anonymous,

 

That depends on what you would like to achieve.

 

Gallery.Selected property is a container to store the record selected from the Gallery, so if you would like to change record, simply switch the record within the Gallery, more information about Gallery, see:

Customize a gallery in PowerApps

Gallery control in PowerApps

If you would like to change the matching Id of the Lookup function, just make sure the Id is within the search table should be OK to go.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 (2,847)