Alpha Video Training
Results 1 to 8 of 8

Thread: Open UX, select item from list, goto panel.. programmatically

  1. #1
    Member
    Real Name
    Cemo Polat
    Join Date
    Jan 2010
    Posts
    42

    Default Open UX, select item from list, goto panel.. programmatically

    Hi,

    Within a UX component, is it possible to open another UX, filter it or goto a specific panel card / record ?
    Hopefully without writing Java script by hand..

    Or maybe, on the second UX initialize, check for some kind of Open Arg. and continue accordingly - yes coming from Access / VBA :)

    Thanks in advance..

    Cemo Polat

  2. #2
    Banned
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,819

    Default Re: Open UX, select item from list, goto panel.. programmatically

    Hey Cemo,

    Your question is quite broad, but, yes... it's possible to open a UX, from a UX, and populate that UX with data from a table based on values from your parent UX.

    For example, The Action Javascript "Open a UX Component" has a property named Populate UX with Data from a Table where you specify the key(s) from the parent UX that are used to populate your data bound child UX.

    To open a child UX and move to a specific panelcard based on data from the Parent UX you may have to write a couple of lines of javascript, but no more than that... and combine that with some Action Javascript.

    I lived in Access/VB for decades so I know where you're coming from.

    You'll find the power of javascript combined with Alpha's XBasic, plus all the pre-built Actions quite amazing.

    One concept you need to establish is Client-side vs. Server-side. There is so much you can do at the browser level without ever having to visit the server to get stuff done.

    If you have a couple of specific UX components that you're working with and can define specifically what you need then post the components for further help.

  3. #3
    Member
    Real Name
    Cemo Polat
    Join Date
    Jan 2010
    Posts
    42

    Default Re: Open UX, select item from list, goto panel.. programmatically

    Hi David,

    Thx for your answer.
    Let me clarfiy my question with a very basic example;

    uxCustomer; 2 panels, 1st panel has a list, 2nd panel has all detail fields. Normally user selects a customer from list, and 2nd panel opens with detail.
    uxInvoices; I have a button next to the "customercode". When I click that, I just need to open uxCustomer (probably in a new browser window), automatically select that customer (behind the scenes) and go to details panel.

    In Access forms, on open event of "uxCustomer", I was checking for OpenArgs and if it was called from another form, was going to that record automatically.
    I wasn't using a filter because there were navigation buttons, search box etc. which would make no sense if only one record is filtered.

    The idea here is, to "re-use" UX components without having to create separate one for each case. Otherwise it takes too much time to maintain them in the future.

    BR

    Cemo

  4. #4
    Banned
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,819

    Default Re: Open UX, select item from list, goto panel.. programmatically

    Cemo,

    Have a look... this may get you close to what you need.

    The Customers UX is standalone, or can be used with the Invoices UX.

    The Invoices UX opens the Customers UX in a Dynamic Panel, inside the Invoices UX, as a child component.

    There are a few lines of javascript... but nothing too involved.

    http://www.youtube.com/watch?v=yyYc6fIoGDI

    Here's the javascript that goes into the Inline Javascript action...

    Code:
    var cObj = {dialog.Object}.getChildObject('UXCUSTOMERS')
    var custId = {dialog.Object}.listGetValue('invList','CUSTID');
    cObj.setValue('custList',custId);
    cObj.runAction('populateControlsFromList');	
    cObj.panelSetActive('PANELCARD_2',true);
    And finally, since you now have 2 Actions (1 to open the UX, and 1 to navigate to your detail) and because the detail navigate depends on the Customers UX being rendered, make sure to "check" the Run Actions Synchronously.
    Last edited by Davidk; 06-08-2014 at 11:32 AM.

  5. #5
    Member
    Real Name
    Cemo Polat
    Join Date
    Jan 2010
    Posts
    42

    Default Re: Open UX, select item from list, goto panel.. programmatically

    Thank you very much for your time David.
    I think this "dynamic panel" thing is the key point and it adds a big flexibility.

    Regarding the Java script part, your code is clear enough to get the logic. I think I will have to learn a little bit Java...

    Just one "out of topic question"; when do you prefer to use list control "has detail view" property rather than creating the controls and binding them from "data binding" section ?
    Especially when creating multi-table UXs, which way should I go ? (e.g. Tasks, related files, related notes, assigned people etc..)

    Thx again...

    Cemo

  6. #6
    Banned
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,819

    Default Re: Open UX, select item from list, goto panel.. programmatically

    There's a tiny caveat with the List Detail View. It's available, but not in it's complete form yet. Detail View is going to be part of the much bigger Disconnected support. So... you can view data in Detail View but you can't edit/save that data, unless you go through the normal binding process. Detail View is a great/easy way to populate those controls. So the answer is... use the data binding method to edit/save data.

  7. #7
    Member
    Real Name
    Cemo Polat
    Join Date
    Jan 2010
    Posts
    42

    Default Re: Open UX, select item from list, goto panel.. programmatically

    Oh I see..
    So I can use it to show the "read only" details to the user without having to bind sub-table, creating master-child relations etc..
    Now it makes more sense, thx..

    Cemo


    Quote Originally Posted by Davidk View Post
    There's a tiny caveat with the List Detail View. It's available, but not in it's complete form yet. Detail View is going to be part of the much bigger Disconnected support. So... you can view data in Detail View but you can't edit/save that data, unless you go through the normal binding process. Detail View is a great/easy way to populate those controls. So the answer is... use the data binding method to edit/save data.

  8. #8
    Banned
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,819

    Default Re: Open UX, select item from list, goto panel.. programmatically

    I don't think it's a sub-table, master-child thing. In the Invoices/Customers case you're showing Customer details based on a Customer Id from an Invoice record.

    In a List, whatever fields you're pulling in from the table can be displayed in a Detail View. When you do this, you'll notice in the Binding Section that the List control, and it's binding info, is displayed. You can't do anything with it, but it is there. Whereas, without a Detail View, that List Binding info is not there.

Similar Threads

  1. Can I programmatically modify selected row on list control?
    By fthall3 in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 05-21-2014, 07:39 PM
  2. Programmatically update List source function
    By JPMPA in forum Mobile & Browser Applications
    Replies: 14
    Last Post: 03-22-2014, 05:44 AM
  3. Pre-select list item based on query string variable / show detail
    By TylerFree in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 01-15-2014, 11:09 AM
  4. How to Select a Tab Pane Programmatically in a Dialog2 Component
    By Dfred in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 03-28-2013, 06:22 PM
  5. Cannot select first item!
    By coop9653 in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 05-17-2008, 12:11 PM

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
  •