Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ZcGZ1PLkVesMW31QCcF8Qo
Power Apps - Building Power Apps
Answered

Filter a form view from output from another form view

Like (0) ShareShare
ReportReport
Posted on 21 Feb 2019 17:17:09 by 12

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!

Categories:
  • Instukem_B Profile Picture
    12 on 21 Feb 2019 at 19:06:53
    Re: Filter a form view from output from another form view

    That was it! Thanks a bunch!

  • Verified answer
    TimRohr Profile Picture
    669 on 21 Feb 2019 at 19:04:50
    Re: Filter a form view from output from another form view

    Add ".Text" to your DataCardValue1...

     

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

  • Instukem_B Profile Picture
    12 on 21 Feb 2019 at 18:48:35
    Re: Filter a form view from output from another form view

    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. 

  • Verified answer
    TimRohr Profile Picture
    669 on 21 Feb 2019 at 18:40:26
    Re: Filter a form view from output from another form view

    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.

  • Instukem_B Profile Picture
    12 on 21 Feb 2019 at 18:20:53
    Re: Filter a form view from output from another form view

    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.

  • TimRohr Profile Picture
    669 on 21 Feb 2019 at 18:08:26
    Re: Filter a form view from output from another form view

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

     

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

    ...in the Item property.

  • TimRohr Profile Picture
    669 on 21 Feb 2019 at 18:07:06
    Re: Filter a form view from output from another form view

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,763 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard