Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 16 of 16

Thread: How to set the focus on a certain tab on a screen????

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default How to set the focus on a certain tab on a screen????

    Ok,

    Does anyone know how to set the focus on a certain tab on a screen. Example would be when you create a new Incident if you wanted the screen to always come up with the contacts tab as having the focus.

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    For ay screen, the display application searches the field that has TabStop 1. So if you want the focus set to the contacts tab, give the "contact.name" field the TabStop of "1" (through Forms Designer), and make sure no other fields use the same ordernumber.

    That should to the trick 8) .

    Regards,
    Jos

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default Thanks

    Hey,

    Thanks for the reply. I'll try that out and let you know if it works for us.

  4. #4
    Member
    Join Date
    Jul 2002
    Location
    Florida, USA
    Posts
    56

    Default

    You can dynamically change the default tab, too. For example, we have multiple tabs on a notebook on our first screen. The HelpDesk wants it to default to tab 1, but the other customer support team wants it to default to tab 3. We use the cursor.field.name.set() function, and have had much success... we look at a certain flag in the operator's $G.pm.environment, and using an "if" statement on formatcontrol, we use the cursor.field.name.set() function to set the cursor to the desired field on the desired tab. This is but one example, we have many other uses, too.

    Here is more info about the function:
    cursor.field.name.set
    Sets the cursor to a specific field on a form.
    Format
    cursor.field.name.set($field.name, $row.number)
    • $field.name The name of the field.
    • $row.number For arrays, the row number. (This parameter is optional.)
    Example
    cursor.field.name.set("address", 2)
    After execution, the cursor will appear in the second row of the address
    input field on the next form that is displayed.
    Factors
    • This function returns no value. It is not necessary to use it in an
    assignment statement.
    • If the field is an array, you can position the cursor on a specific row by
    specifying $row.number .
    • In GUI mode, if the cursor is set to a field that is off-screen, the cursor will
    be correctly positioned off-screen, i.e., the cursor will not be visible until the
    field is scrolled into view.
    • In text mode, the cursor is never positioned off-screen. In text mode, if the
    cursor is set to a field that is off-screen, the cursor will be positioned in the
    first input field whose ctrl setting is 16.

    Hope this helps...
    Shirley

  5. #5
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default

    Now this is a really great solution and more along the lines of what I was looking for. This will allow me to enforce certain tabs to be the one that has the focus which is what I'm wanting to do. I'll try this out and see if I can get it to work, but judging from your post, I'm sure it won't be a problem.

  6. #6
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default Hmmm, it isn't working

    Well I tried to use the cursor.field.name.set() function on problem.template.open.g form to get it to automatically show like the third tab on a notebook when that screen comes up but it isn't working. I went into the format control of problem.template.open.g and under inititalization strings I added the following code

    cursor.field.name.set("KeyItem")

    KeyItem is the name of the field. I tried it two ways. I actually added KeyItem under the name property of the field on that tab and than used it in the function. I also tried useing the name of the input property on that same field inthe function in format control and niether of these worked. I really would like to get this working so if you think you can help than that would be great.

  7. #7
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    I was just curious and tryed to do that in my system too.

    But I didn't get it to work either.

    I am using SC3.


    Frank
    Frank

    • If it happens once, it's a bug.
    • If it happens twice, it's a feature.
    • If it happens more than twice, it's a design philosophy.

  8. #8
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default

    We are using ServiceCenter Version 4.07 and it does not work, so I'm not sure why that other person says it works for them, unless they are not understanding what it is I'm trying to do. Very frustrating though.

  9. #9
    Member
    Join Date
    Jul 2002
    Location
    Florida, USA
    Posts
    56

    Default

    Sorry for the delay in responding... you need to put the logic on calculations in the format control.... we found it best to put it on Display, Add, and Update.

    Shirley

  10. #10
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default

    Hey, that works now. Thanks alot. I love being able to do this.

  11. #11
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    Hi Shirly...

    I'm sorry.. I don't understand what you mean with
    Quote Originally Posted by saburns
    you need to put the logic on calculations in the format control
    My english isn't the best... you already seen that maybe.. :roll:

    Maybe you have the time to explain that to me?
    Frank

    • If it happens once, it's a bug.
    • If it happens twice, it's a feature.
    • If it happens more than twice, it's a design philosophy.

  12. #12
    Junior Member
    Join Date
    Aug 2002
    Posts
    9

    Default

    Inside of Format Control, on which ever form you want, you have buttons across the top for choosing what you want to do. From left to right they read - VIEWS, QUEIRES, CALCULATIONS,VALIDATIONS, SUBROUTINES,ADDLOPTIONS,PRIVELEDGES

    You just click on CALCULATIONS and add the function there, and put true in display, or add, delete or whatever you want to fire off the function.

    Hope that helps.

  13. #13
    Member
    Join Date
    Jul 2002
    Location
    Florida, USA
    Posts
    56

    Default

    'Sureshot' nailed it -- that is exactly what I meant. Sorry for the confusion.


    Shirley

  14. #14
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    Ok.. thanks for the help.
    Got it to work !

    Frank
    Frank

    • If it happens once, it's a bug.
    • If it happens twice, it's a feature.
    • If it happens more than twice, it's a design philosophy.

  15. #15
    Junior Member
    Join Date
    Feb 2002
    Location
    Canada
    Posts
    1

    Default AWESOME!!

    Thanks for this post! We have been trying to figure this one out for weeks now. I just popped by to see if there was some post for something else we are working on and VOILA!!!

    This is a GREAT feature and function. So much flexibility.

    THANKS! :lol: 8)

  16. #16
    Member
    Join Date
    Dec 2002
    Location
    Bristol, England
    Posts
    83

    Default

    Just used it myself Shirley. Thanks
    Andy
    We all live in a yellow subroutine !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

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