Alpha Video Training
Results 1 to 4 of 4

Thread: Display a Report based on the Selected Row of a List Control

  1. #1
    Member
    Real Name
    Phil Samuels
    Join Date
    Jan 2011
    Posts
    186

    Default Display a Report based on the Selected Row of a List Control

    I hope this is an easy one for someone out there.

    I have an Android Tablet App that displays a List of Jobs, after the user enters a date. The list displays perfectly.

    Here's what I need:

    When the user taps one of the records (rows) of the list, I want to open an Alpha Report, based on the Job # field in that row.

    To do this, I added the "PhoneGap - Open File with Native Application" Action to open the report. If I don't add a "filter," the Report opens perfectly... and looks great. However, I can't figure out how to filter the Report to display only for the Job # of the selected Row. I've searched the videos and the message board and cannot get it to work.

    I think the easy solution would be to set an Argument based on "a specific field on a list control," but I don't know how to do this. I know how to set an Argument based on an individual control on a UX (or Grid) and I know how to filter a report on the "Current List Filter," but NOT how to do it for a single field on the selected Row (record) of a List control.

    I'm familiar with this UX Method: {dialog.Object}.listGetValue('JOBLIST', 'JOBNUM'); That might get me to where I want... But I'm not sure where to put the command or how to base an Argument on it.

    The report I'm running is a "job quotation," based on the Job #, so without that filter, it's useless for the users.

    I'm hoping someone has done this before and can help or point me in the right direction. I'd appreciate it.

  2. #2
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    205

    Default Re: Display a Report based on the Selected Row of a List Control

    Hi Phil,

    Take a look at this screenshot. It indicates what I think you are trying to do. You can get the job # using javascript as you mentioned, populate a control and feed that in a local filter.
    report_filter.png

  3. #3
    Member
    Real Name
    Phil Samuels
    Join Date
    Jan 2011
    Posts
    186

    Default Re: Display a Report based on the Selected Row of a List Control

    Hi Sean-

    You're amazing! Worked like a charm. I added a textbox called "Holder" (and hid it) and added my code to update that field:
    var JobNumHolder= {dialog.Object}.listGetValue('JOBLIST', 'JOBNUM');
    {dialog.Object}.setValue('HOLDER',JobNumHolder);
    Then, I opened the report using a "local filter," just as you suggested. I've been programming with Alpha for many years and I'm embarrassed to say that I've never used a local filter for any of my operations. Needless to say, because I've been using SQL filters, many of those operations are much slower than they needed to be (I'll have to return to some of my applications to see if I can improve performance).

    Not that it would have helped, but the "Define Local Filters" is more hidden in the "Phonegap - Open File with Native Application" Action (I wouldn't have thought of it anyway) than it is on other areas (like "Open a Report").

    I'm sure I'll use that technique often.

    I really appreciate your taking your valuable time to answer my question.

    With appreciation,
    Phil

  4. #4
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    205

    Default Re: Display a Report based on the Selected Row of a List Control

    I'm glad I was able to assist you Phil. Happy Coding!

Similar Threads

  1. Replies: 7
    Last Post: 10-17-2018, 10:30 PM
  2. How to create custom report based on selected columns ?
    By ferryk17 in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 07-14-2016, 10:44 PM
  3. 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
  4. List control - selected index?
    By Jane1234 in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 12-13-2015, 06:21 PM
  5. List control loses selected value
    By rjackson@arach.net.au in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 11-12-2013, 05:12 AM

Bookmarks

Posting Permissions

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