Alpha Video Training
Results 1 to 11 of 11

Thread: Display some field values in a tabbedui Header

  1. #1
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,040

    Default Display some field values in a tabbedui Header

    Hi
    Upon selecting a Patient in any UX or Grid, i would like to show the current selected patient name and some other fields like phone number in the tabbedui's header. How can i do that?
    Currently those values update different session variables ( one for the id, one for the name etc...)

    Many thanks
    Jaime

  2. #2
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,625

    Default Re: Display some field values in a tabbedui Header

    here is what I do...
    Put this in the Header text property

    <div id="header_detail" style="width:100%;bgcolor:#3a4048;border:solid 1px #3a4048;font-size:12pt;font-weight:bold;color:#fff;">
    <div id="header_title" style="float:left;width:15%;text-align:left;">
    Quote Tool
    </div>
    <div id="header_profile" style="float:left;width:30%;text-align:right;">
    Selected Profile is <%a5 ?SESSION.PROFILEID %> <%a5 ?SESSION.PROFILENAME %> in <%a5 ?SESSION.DISTRICT %>
    </div>
    <div id="header_date" style="float:left;width:15%;text-align:right;border-right: 1px solid white;color:#fff;">
    <%a5 ?date() %>&nbsp;&nbsp;
    </div>
    <div id="header_logout" style="float:right;width:15%;text-align:right;">
    <a href="logout.a5w" style="border: none; text-decoration:none; display: inline-block">
    <img style="vertical-align:middle;border:none;" src="images/stock_exit.png" >Logout</a>&nbsp;&nbsp;
    </div>
    <div id="header_user" style="text-align:left;">
    &nbsp;&nbsp;<%a5 ?SESSION.FULLNAME %>
    </div>
    </div>

    Then in the component where you select your patient:

    function SetSelectedProfile as C (e as p)
    SESSION.PROFILEID = convert_type(e.dataSubmitted.PROFILESEARCH,"C")
    SESSION.PROFILENAME = "Unknown"
    dim cnx as SQL::Connection
    dim crs as SQL::ResultSet
    if cnx.open("::Name::SS1-SAP")
    dim sql as C = "SELECT FORMALNAME, NICKNAME, DISTRICT FROM mqPROFILES WHERE PROFILEID = " + e.dataSubmitted.PROFILESEARCH
    if cnx.Execute(sql)
    crs = cnx.ResultSet
    SESSION.PROFILENAME = crs.data("FORMALNAME")
    SESSION.DISTRICT = crs.data("DISTRICT")
    SESSION.NICKNAME = crs.data("NICKNAME")
    if SESSION.PROFILENAME = "" .AND. len(SESSION.NICKNAME) > 1
    SESSION.PROFILENAME = SESSION.NICKNAME
    end if
    end if
    cnx.close()
    end if
    dim txt as C = "Selected Profile is " + SESSION.PROFILEID + " " + SESSION.PROFILENAME + " in " +SESSION.DISTRICT
    dim js as C = "parent.document.getElementById("header_profile").innerHTML = "" + js_escape(txt) + "";"
    SetSelectedProfile = js
    end function
    Pat Bremkamp
    MindKicks Consulting

  3. #3
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,040

    Default Re: Display some field values in a tabbedui Header

    Thanks Pat, you make it look so easy :-)
    I think i can modify the line:
    Code:
    <div id="header_profile" style="float:left;width:30%;text-align:right;">
    Selected Profile is <%a5 ?SESSION.PROFILEID %> <%a5 ?SESSION.PROFILENAME %> in <%a5 ?SESSION.DISTRICT %>
    </div>
    by
    Code:
    <div id="header_profile" style="float:left;width:30%;text-align:right;">No patient selected</div>
    since SetSelectedProfile will build the innerHTML from scratch, isn't it?

  4. #4
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,625

    Default Re: Display some field values in a tabbedui Header

    That's a good idea. Give it a try.
    Pat Bremkamp
    MindKicks Consulting

  5. #5
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,040

    Default Re: Display some field values in a tabbedui Header

    Didn't work at first, because of the "color: #fff" ( that's white over white ) in your sample, but now it works.

    Do you have any idea how can i change now whatever is displayed to be an array, say in a dropdownbox?
    The idea behind it is that most of the time they work on a specific patient, then just one small action on another patient before coming back to the first one. So, if i save them in a dropdown, they can come back to the first one quickly.

  6. #6
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,040

    Default Re: Display some field values in a tabbedui Header

    ...also do the SESSION variables need to be char type? Noticed you converted your ID

  7. #7
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,625

    Default Re: Display some field values in a tabbedui Header

    Yes session variables should be charcter type. They may work in some places as other types, but according to Alpha, at some time they will become character only, so you might as well set them up that way now as you go along.
    Pat Bremkamp
    MindKicks Consulting

  8. #8
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,625

    Default Re: Display some field values in a tabbedui Header

    What I usually do is set the order of the (in your case patients) to be the most recent worked on. That way the ones they want to search for will often be on the page with no searching needed.
    Pat Bremkamp
    MindKicks Consulting

  9. #9
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,040

    Default Re: Display some field values in a tabbedui Header

    Thans Pat. My question was how can i put a control (dropdownbox or some other display mechanism ) in the "header_profile" div from your sample for instance

  10. #10
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,625

    Default Re: Display some field values in a tabbedui Header

    ouch. That hurts my brain. Maybe you could create a session variable of a state variable and a button on the page to do a return, not in the header. You need to do a save on the current patient anyway, (or lose the data) so that give you an opportunity to save the "last" patient.
    Pat Bremkamp
    MindKicks Consulting

  11. #11
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,040

    Default Re: Display some field values in a tabbedui Header

    LOL my brain hurts daily :-)
    I'm thinking of ditching the tabbedui alltogether and use a UX with buttons and expanding menus, will give me a little more control.

Similar Threads

  1. How can I configure the group header in my grid to display a value of a field not....
    By coleresources in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 01-25-2013, 03:51 PM
  2. Filtering Dropdown Box - using Variables for display/store values - grid/TabbedUI
    By Malcolm in forum Application Server Version 11 - Web/Browser Applications
    Replies: 8
    Last Post: 07-10-2012, 05:02 AM
  3. TabbedUI Header with Hyprlink field
    By njguy in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 02-03-2011, 09:21 AM
  4. How to refresh the TabbedUI Header/Footer?
    By bowenjohn in forum Application Server Version 10 - Web/Browser Applications
    Replies: 6
    Last Post: 03-17-2010, 04:56 AM
  5. TabbedUI Header Question
    By glenschild in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 02-18-2010, 09:23 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
  •