Alpha DevCon 2018
Results 1 to 5 of 5

Thread: Filter List Control Based on field in previous Panel Card (also PhoneGap Shell Plug)

  1. #1
    Member
    Real Name
    Scott Moore
    Join Date
    Oct 2010
    Posts
    231

    Default Filter List Control Based on field in previous Panel Card (also PhoneGap Shell Plug)

    Hi Everyone,

    Hoping someone had a tip on a panel card/list control question.

    Panel Card "A" has a textbox with the customer ID. When panel card "B" is activated by clicking a button on panel card "A", I want the list control on the "B" panel to show all of the addresses filtered by the customer ID from panel A. So in a nutshell, how would I filter the list control on panel card B based on a value in panel card A? When the user clicks the button to navigate to panel card B should I set a session variable with the customer ID? Or is there a better way?

    Also, if you are building a phonegap application take the time to get the Shell working. It saves you a TON of time by no having to compile your application each time. Here is a link to the Youtube video: https://www.youtube.com/watch?v=h70F8xziz1Q

    Thanks,

    Scott

  2. #2
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,438

    Default Re: Filter List Control Based on field in previous Panel Card (also PhoneGap Shell Plug)

    Scott have you read the help on this? The primary Key Value of List A will be returned when you click or tap on the row in the list (or a button or whatever), you set an argument based on the the value of the ListA, then the select statement of ListB needs to be filtered against the argument, e.g. where ListB.FieldThatsThePrimaryKeyOfListA = :ListA then set the Has parent options in ListB to Has Parent, and nominate the fields where requested (bit of a trap here you need to look for the smart field in the far right). And thats it.

    Peter
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

  3. #3
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,671

    Default Re: Filter List Control Based on field in previous Panel Card (also PhoneGap Shell Plug)

    I don't think there's a List Parent/Child setup here. Just a Textbox on PC A and a List on PC B which is filtered on the value from the Textbox.

    Scott, a UX component has an Arguments property which is global to the UX. It is accessible from the UX properties... and... from any List Control. You create an argument... e.g. argCustId... and you can set it's data type and Argument Binding.

    The Argument Binding can be "Set value at Run-time" and this setting gives you a "Value" dropdown which is a list of pretty much all the "input" type controls in your UX... including your Textbox control. You select your Textbox control and your Argument is now established.

    You then use that Argument in your List Select statement or filter. The argument syntax is the same as everywhere else in Alpha... :argCustId.

    Depending on what's going on with your UX and List setup, you may need to use the .refreshListData() method.

  4. #4
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,438

    Default Re: Filter List Control Based on field in previous Panel Card (also PhoneGap Shell Plug)

    Well text box or List, the action is to set an argument and filter against it - good spotting David, must admit I go through these quickly as I'm always under the pump for clients, it's getting more difficult to contribute here.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

  5. #5
    Member
    Real Name
    Scott Moore
    Join Date
    Oct 2010
    Posts
    231

    Default Re: Filter List Control Based on field in previous Panel Card (also PhoneGap Shell Plug)

    Hi David and Pete,

    Thanks for the tip - that is exactly what I needed. Panel A is just a text box, no list control. Understanding that I can set an argument in the UX was the missing link.

    Cheers,

    Scott

Similar Threads

  1. How to open a report based on current list control filter?
    By Gatorfan in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 06-22-2016, 11:44 AM
  2. Cannot scroll a panel card with a fixed height List control
    By DaveF in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 04-20-2015, 06:05 PM
  3. How to show data from previous panel card
    By Td203 in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 02-06-2015, 02:09 AM
  4. Panel card with List - Disable Scroll on List so Panel card scrolls
    By stewx in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 08-29-2014, 12:51 PM
  5. How to show/hide a panel card based on a control in side a panel navigator?
    By Ferenju in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 03-18-2014, 01:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •