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.
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.
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
Hey,
Thanks for the reply. I'll try that out and let you know if it works for us.
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
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.
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.
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.
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.
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
Hey, that works now. Thanks alot. I love being able to do this.
Hi Shirly...
I'm sorry.. I don't understand what you mean with
My english isn't the best... you already seen that maybe..Originally Posted by saburns
: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.
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.
'Sureshot' nailed it -- that is exactly what I meant. Sorry for the confusion.
Shirley
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.
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)
Just used it myself Shirley. Thanks
Andy
We all live in a yellow subroutine !
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks