View information based on a field - InfoPath Dev
in

InfoPath Dev

View information based on a field

Last post 04-13-2007 09:32 AM by Greg Collins. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-11-2007 01:31 PM

    View information based on a field

    This is a weird one to me.
    I have a master detail on my form, the master contains a field that shows the number of attachments that this record contains (the attachment information is stored in the xml of the form). What i need to do is create a new view that shows a list of all of the attachments, i click a button on the master and that switches the view and once i do that the view needs to show only the attachment information for the record whose button i clicked. I don't really know how to go about doing this.... any ideas.
  • 04-12-2007 10:42 AM In reply to

    Re: View information based on a field

    There needs to be some unique identifier for that row, whether its an ID or the physical row number in the XML...

    When the button is clicked, set a field value with that identifier.

    In the other view, filter based on that identifier, to only show that row.

    When you switch back to the catalog view, you might want to clear the value of that filter field.
  • 04-12-2007 10:45 AM In reply to

    Re: View information based on a field

    ok so i've got that part working (thanks for your reply by the way) but i have another question.. the detail section, these values are not stored in a datasource of any sort rather i would like to be able to set them when the master has been selected and then i will programmatically enter the values at that time.. can this be done or do the values have to be in a field on the datasource?
    thanks
  • 04-12-2007 10:54 AM In reply to

    Re: View information based on a field

    You can set up an XML secondary data source (2DS) with the fields you need. These fields wont' be saved.

    Add the 2DS fields to the detail section, and programmatically set their values. Since only one detail section appears at a time, you can get away with this.
  • 04-12-2007 10:58 AM In reply to

    Re: View information based on a field

    Thanks Greg, that's great.. the last thing i want to know is where would i actually put the programming to set these fields? I can't seem to find an on data bound type of thing or an on selected for the master..
  • 04-13-2007 09:32 AM In reply to

    Re: View information based on a field

    Put the code in the view switching event... when you switch to the details view, populate the fields -- you can use the same ID we talked about earlier to figure out what you need to figure out for populating the fields correctly.
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.