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

Filter and Lookup without Gallery

Hi everyone!

 

Currently building an app and I'm at the point where I need to implement a "Select ..... query" like functionality in SQL langauge.

 

So the **bleep** is, when a user clicks on the progress button(view below)

ddururur.PNG

 

It should render all the details from the item I lookup in the list, and with whatever they chose from the form will evaluate the actions they need to do. I am stuck with using Filter/LookUp/Search because it's not grabbing the values from item in my list and putting it into the form, and I AM NOT using the Gallery function. Is this still possible?

 

Because currently I have 'Filter('Refund Forms', Title =EpicNameValue.Text);' on the OnSelect property of the Progress button

 

This is what my form looks like:

sdsadsad.PNG

I want to be able to call the exisitng details of an item and making those information the default values.

 

This is the results that is dependent on the outcome of what they chose from the form:HALO.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: Filter and Lookup without Gallery

After setting the Form.Item with the LookUp function, the parent form receives automatically all the values. You do not need to use the "LookUp" function for each control. I would suggest to use PwoerApps wizard to automatically build a test application out your data source (see New/Start with your data section). You will end up with 3 screens: 1 - To search and select an item, 2 - To preview the selected item and 3 - To edit the selected item or to add a new item. I believe checking how controls are bound in forms on screens 2 and 3 will give you a good understanding on how to configure card controls.

View solution in original post

8 REPLIES 8
Microsoft Employee

Re: Filter and Lookup without Gallery

Just to confirm I understand the issue correctly:

You have a list from which you find an item via the "LookUp" function. That works fine. What you want to do now is to extract the details of that item from the same list? If so then note that the LookUp function returns a record, not a value. That record contains all the details you need. No need to query them.

If however you want to extract the details from a different list (or Table) then you can extract the details via another LookUp function:

Lookup(List2, name=epicName.Selected.Value)

Here, I assume that epicName is the name of your ComboBox control from the first screenshot and the List2 is the name of the second list (or table) you want to get the detailed information from.

Highlighted
Anonymous
Not applicable

Re: Filter and Lookup without Gallery

Hi dinusc!

 

Currently the “LookUp” function doesn’t work. When I call 'Filter('Refund Forms', Title =EpicNameValue.Text);' on the OnSelect property of the Progress button on image 1, I want all the details of the Item/Object called to populate it’s data on image 2.

 

When I call the “LookUp” this is not doing so, most likely because the fields on image 2 doesn’t know to read the values for when I query the Item/Object using the “LookUp” function.

 

How do I tell my form on image 2, that when Progress button is pressed instead of reading the user value to instead populating the data on the item I just Looked-Up (like a “View mode”)?

 

Sorry super new to PowerApps and could not find it on the documentation for LookUp/Search/Filter

Microsoft Employee

Re: Filter and Lookup without Gallery

I think I understand the issue now. 

When you press the button on image 1, you want to "select" the item according to the value from the EpicName control. For this, you do not need "Filter" function as it returns a table. Even if it returns just one record, the return type is a table with one record. What you need to do on the button click is to call "Navigate" to the screen that contains the form from the second image and pass the EpicName as parameter. The LookUp function would go on on the form from the second image. The formulas:

Image1 (Screen1)

YourProgressButton.OnSelect=Navigate(Screen2, ScreenTransition.Fade, { MyParam: EpicNameValue.Text })

Image2 (Screen2)

YourForm.Item=LookUp('Refund Forms', Title=MyParam)

 

If both image1 and image2 is on the same screen, change the button formula as following:

YourProgressButton.OnSelect=UpdateContext({ MyParam: EpicNameValue.Text })

... and leave the second formula unchanged.

 

Finally, at the risk to confuse you (you can completely disregard this), I will provide another example of the second formula, without using the LookUp, so you can see the difference:

YourForm.Item=First(Filter('Refund Forms', Title=MyParam))

Here, you use Filter formula that returns a table and then get the first record (which is probably the only one) to ensure the final type is "reocrd" and not "table"

 

 

 

Anonymous
Not applicable

Re: Filter and Lookup without Gallery

Hi dinusc,

 

Thank you for that! But despite passing the EpicValue text as a parameter to my other screen, and doing my LookUp on my form.items the data is still not populated on the form.

 

Do I have to go through all the questions on my form and change the values to instead show the details of the title value?

 

If(!IsBlank(MyParam), LookUp('Refund Forms', Title = MyParam, Storage), ThisItem.Storage)

The code above is my code for checking if MyParam has a value or not. I think it's inefficient to do and slow and also doesn't work for Radio controllers.

 

Can I not simply use my Lookup and for each question / control iterate through other coloumns on the list and show the details of the title details into the form?

 

Am I missing a step?

 

 

Microsoft Employee

Re: Filter and Lookup without Gallery

After setting the Form.Item with the LookUp function, the parent form receives automatically all the values. You do not need to use the "LookUp" function for each control. I would suggest to use PwoerApps wizard to automatically build a test application out your data source (see New/Start with your data section). You will end up with 3 screens: 1 - To search and select an item, 2 - To preview the selected item and 3 - To edit the selected item or to add a new item. I believe checking how controls are bound in forms on screens 2 and 3 will give you a good understanding on how to configure card controls.

View solution in original post

Anonymous
Not applicable

Re: Filter and Lookup without Gallery

Great advice! Thank you so muich 🙂

P.S. Solved it 

Anonymous
Not applicable

Re: Filter and Lookup without Gallery

Anonymous
Not applicable

Re: Filter and Lookup without Gallery

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 349 members 6,212 guests
Please welcome our newest community members: