Highlighted
Absent Member.. Absent Member..
Absent Member..
3797 views

Changing Cursor position from Link doesn't work

Jump to solution

Hello all,

 

this is my first post in the HP Support Forum. I hope my stay here will be long and prosper so i can learn and teach as much as i can.

 

So for my first issue: i'm unable to change the cursor position from the post expression / javascript Tabs in a linkline. I also tried the post expression / javascript tabs of the Display Option for Fill, that didn't do much good either.

 

As far as i've heard, this is a know issue with links, however, the question is: do you guys know of any workarround?

 

Any help appreciated.

 

Thanks, Andrei

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

I figured it out and it's deffenitely a HP Bug:

 

Conclusion: cursor.field.name.set() does not work on fields created inside nested NoteBook Tab Structures.

Workarround: create the field inside the 1st lvl Notebook Tab (or outside the Tab entirely), save the form (and make sure that cursor.field.name.set() is moving the cursor to that field), then move the field to the desired location (2nd lvl Notebook Tab)

 

-m-, might wanna try that Format Control Validation test on a field in a 2nd lvl Notebook Tab. I'm thinking it's the same reason why that didn't work for me.

View solution in original post

0 Likes
28 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Hello Andrei,

Not sure about what is the issue. You can not swithc between the tabs in the link line? If yes then I can assure that it works normally on HP SM clients 7.0x, 9.20.x versions.

If the problem is in other, please write more wider about what are you doing.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Oh, no no. Maybe i explained wrongly.

 

I am trying to jump from the comfill button to another Fiield (a textarea) from another Notebook Tab using cursor.field.name.set(). I tried using the function in the post expression/javascript tabs of the linkline, aswell as the post exrepssion / javascript tabs of the Fill Display Option

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

:smileyhappy: Have not used that function before so can not suggest anything. Hope someone will give you answer.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Well thank's for your interest, still :smileyhappy:

 

I really hope someone will show up with knowledge on this subject, i need it badly :smileytongue:

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Andrei...it has been my experience that the cursor.field.name.set() function works in Format Controls and Display Screens but not in Links.

 

Consider using $fill.recurse if the action on the next field will also be a Fill. Otherwise, perhaps creating a temporary variable may provide the desired functionality?

 

Example: Move the cursor to the subcategory field after performing a fill against the category field

 

Post Expressions (within category link line):

if (not null(category in $File)) then ($G.custom.cursor="subcategory")

 

Expressions (within Display Screen):

if (not null($G.custom.cursor)) then cursor.field.name.set($G.custom.cursor);cleanup($G.custom.cursor)

Highlighted
Absent Member.. Absent Member..
Absent Member..

Hello -m-

 

I tried your suggestion but it didn't work. Do you know what property of the field cursor.field.set() looks at when comparing with the provided parameter? is it the Input property or the Name property?

 

And if it's the Input property, would the function work with $update.action as a parameter for example?

 

 

Note: I actually set a value (update.action) in the Name property just to test, but that didn't do anything either.

0 Likes
Highlighted
Absent Member.
Absent Member.

I retested the example in 7.11 and 9.20 and it worked using the SD.open.interaction Link and cc.first Display Screen. I also confirmed the cursor.field.name.set() function uses the Input property not the Name property.

 

I assume the $update.action reference is the "New Update" field when saving changes to an Interaction. The following example worked in a 9.20 system when performing a Fill against the Closure Code (resolution.code) field:

 

Link: SD.update.interaction

Line: resolution.code

Post Expression: if (not null(resolution.code in $File)) then ($G.custom.cursor="$update.action")

 

Display Screen: cc.edit.incident

Initializations: if (not null($G.custom.cursor)) then cursor.field.name.set($G.custom.cursor);cleanup($G.custom.cursor)

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hello -m-,

 

thanks for your continued support. I really apreciate it.

 

I am still facing an awkward issue so here's what i'm doing. We want to be able to save updates on open of interaction aswell, not only on update, so i copied the whole Activities Tab from SD.update.Interaction to SD.open.interaction.

 

Now i tried your solution with "native" (that were already there) fields on SD.open.interaction and it works. One example would be: logical.name. Oh, btw. JavaScript doesn't successfully run: system.functions.cleanup(); I had to do vars.$G.custom.cursor = null; to clear the variable. (did it in JavaScript because it's easier to prind debug info)

 

However, it doesn't work on $update.action. Don't know why. Are you aware of any issues of SM when looking for fields burried under notebook tabs or smthn? because that's the only thing i can think of. My $update.action is buried under 2 Notebook Tabs: 1 - Activities; 2 - Update.

0 Likes
Highlighted
Absent Member.
Absent Member.

As you mentioned, the cleanup() RAD function has not been implemented in JavaScript yet so setting it to null is appropriate in this example.

 

All of the tests I've run have used the Windows client with the fields on the same screen/notebook tab. It is certainly possible that switching tabs will affect the result. My suggestion is to temporarily relocate the $update.action field to the main screen or the same notebook tab as the "Fill" field. Assuming this configuration works, the field can then be placed one level down and then two and so on.

 

There are several different factors which affect the cursor placement including:

 Windows client: Windows menu -> Preferences -> Appearance -> Use server provided tab order

 System Navigator: Tailoring -> Document Engine -> Processes -> Save Cursor Position?

 

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Update:

 

I removed the second Tab and moved all the fields in the Activities Tab. It didn't work.

Changed the name of the field from $update.action to update.action. It worked.

Yes, i tried it with update.action and the Tabs there.

 

Now the problem is ... I can't keep any of these two changes. Need the Input name to be $update.action and behind 2 tabs. Any clues?

0 Likes
Highlighted
Absent Member.
Absent Member.

I tested the "resolution.code / $update.action" example in Service Manager 7.11 and it worked even though $update.action was on a separate tab (actually tab within a tab) on the SD.update.interaction form.

 

I recommend testing against the SD.update.interaction format before trying to implement on SD.open.interaction. If it works on update but not on open, the issue might be related to the initialization of $update.action. When I enter an existing Interaction record the value of $update.action is {}. Perhaps the issue is $update.action is not defined when opening a new Interaction?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.