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

Filter a form view from output from another form view

Hey Everyone,

 

I'm getting stumped on this one and would appriciate your help... I am trying to have a form view display data using a key in another form view.

 

Basically I have a sharepoint gallery app that is to record lines for delivery scans. When a driver goes to look at the scan history I would like for him to see the details of the order pulled from NAV.

When I set the second form viewer to "First(Sales_Shipment_Compare)" I do get the first result as expected. However, I would like to display the information related to the actual packing slip in question. Below I have a screenshot of the two fields that I would like to link.

 

The top one is the source from the gallery control, the second is what I would like to populate based on the first. Thanks for your help in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions

OK, from what you just shared, your "No" is a field in your "Sales_Shipment_Compare" datasource, and you need to match it to the Scan number you mentioned. In that case, you don't want:

'Packing Slip Number_DataCard1'.DataField

 

...that will just get you the column name of the field from that datasource. You want to reference the actual control name that houses the information.

 

For instance, if I have an employee form with a "Phone" datacard, and then outside the form I add a text input and set the default value to be:

Phone_DataCard1.DataField

...I will get cr6c6_EmployeePhone... NOT the phone number I was looking for.

 

I need to instead reference the actual control housing the information:

DataCardValue24

...which gives me the phone number.

 

Add a text input to your screen and set its Default property to be 'Packing Slip Number_DataCard1'.DataField and you will see what I mean.

View solution in original post

Add ".Text" to your DataCardValue1...

 

First(Filter(Sales_Shipment_Compare, No = DataCardValue1.Text))

View solution in original post

7 REPLIES 7
TimRohr
Solution Sage
Solution Sage

This is fairly straightforward, but to be specific, you're goint to have to provide more data on your setup.

 

In general, if you are trying to populate a single datapoint (like a text input or label) from a datasource based on the information in another item on your screen, you will want either:

LookUp(yourSource, [your condition statement]).yourField

--or--

First(Filter(yourSource, [your condition statement])).yourField

 

If you are trying populate a list (or gallery) of items based on the information in another item on your screen, you will want:

Filter(yourSource, [your condition statement])

 

In any of those instances, it is the [your condition statement] where you would create the linkage between the two fields. For instance:

yourNAVPackingSlipNumber = yourSCANPackingSlipNumber

 

I apologize if that is all already known to you and you're actually looking for help on a different part, but you left so much unsaid about your setup that I figured I'd better start at the beginning.

And, I should add if you are looking to populate a form, use:

 

First(Filter(yourSource, [your condition statement]))

...in the Item property.

Thanks for getting back to me, I appriciate the clarification on the basics for sure. 

 

It's some of the syntax of the condition statement I don't think I'm getting, but to clarify...

 

Right now I have:

First(Filter(Sales_Shipment_Compare, No = 'Packing Slip Number_DataCard1'.DataField))

 

Sales shipment compare is the name of the NAV datasource.

 

This doesn't spit back any errors, however it isn't pulling up any data in the form.

OK, from what you just shared, your "No" is a field in your "Sales_Shipment_Compare" datasource, and you need to match it to the Scan number you mentioned. In that case, you don't want:

'Packing Slip Number_DataCard1'.DataField

 

...that will just get you the column name of the field from that datasource. You want to reference the actual control name that houses the information.

 

For instance, if I have an employee form with a "Phone" datacard, and then outside the form I add a text input and set the default value to be:

Phone_DataCard1.DataField

...I will get cr6c6_EmployeePhone... NOT the phone number I was looking for.

 

I need to instead reference the actual control housing the information:

DataCardValue24

...which gives me the phone number.

 

Add a text input to your screen and set its Default property to be 'Packing Slip Number_DataCard1'.DataField and you will see what I mean.

Makes Sense, don't know why I thought I couldnt do that.

 

Now I have:

First(Filter(Sales_Shipment_Compare, No = DataCardValue1))

 

But it's returning invalid argument type. 

Add ".Text" to your DataCardValue1...

 

First(Filter(Sales_Shipment_Compare, No = DataCardValue1.Text))

That was it! Thanks a bunch!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,550)