Highlighted
Absent Member.. Absent Member..
Absent Member..
1470 views

Mandatory field and set focus does not work

Jump to solution
All,

On validations, I created activity registration for Tasks.

On any update, an activity needs to be registered. If not, validation invoked and I want the focus to the activity field.

Validation : not null(denull($cmt.update))
Update : true
Message : Please describe your Activity.
On Failed Validation Set Focus to: $cmt.update

The activity info is on the second tab on the form.. and the focus is not jumping to the field ...

Windows client

any thoughts?

Maurice
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Mandatory field and set focus does not work

Jump to solution
The only thing I can think of that explains the behavior you're describing is what Tommy mentioned - failure to label an object on the form.

But it's possible you're not sure what he means there, so I thought I'd give some explaination, followed by a way to test if this is the case.

For every element on your form, you know there are properties for that form element; simple things like the "X" and "Y" positions, or the "Width" and "Height" are easy to notice, because there are direct and easily visible reprecussions to these values. Other things, like the "Name" property, for example, you might not even notice, especially for elements that OOB on the forms. But, if the "Name" property is blank on ANY of the form's elements - this means any of the input-type elements (like the Text Box, the Combo Box, etc.), or the label-type elements, and even the Notebook and Notebook Tab type elements - you can experience the issue you're describing.

An easy way to test if this is the case for you is to save a backup copy of your form, and then delete huge sections of your form in Form Designer. At a certain point, you'll see the focus start to work.

View solution in original post

11 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Mandatory field and set focus does not work

Jump to solution
Hi Maurice

Check your format and make sure that all objects hidden as well as visible have a name defined. Just one missing name can cause set focus to fail.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Mandatory field and set focus does not work

Jump to solution
HE Tommy,

checked it , nothing hidden on that level. Any other thoughts maybe?

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

Re: Mandatory field and set focus does not work

Jump to solution
The only thing I can think of that explains the behavior you're describing is what Tommy mentioned - failure to label an object on the form.

But it's possible you're not sure what he means there, so I thought I'd give some explaination, followed by a way to test if this is the case.

For every element on your form, you know there are properties for that form element; simple things like the "X" and "Y" positions, or the "Width" and "Height" are easy to notice, because there are direct and easily visible reprecussions to these values. Other things, like the "Name" property, for example, you might not even notice, especially for elements that OOB on the forms. But, if the "Name" property is blank on ANY of the form's elements - this means any of the input-type elements (like the Text Box, the Combo Box, etc.), or the label-type elements, and even the Notebook and Notebook Tab type elements - you can experience the issue you're describing.

An easy way to test if this is the case for you is to save a backup copy of your form, and then delete huge sections of your form in Form Designer. At a certain point, you'll see the focus start to work.

View solution in original post

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

Re: Mandatory field and set focus does not work

Jump to solution
Thanks Jacob. got all that. No fields as such ..

I did place the tab as the first tab : it works.

I placed the field on the form, removed all tabs at all : it works.

What can cause this ?

thanks!

maurice

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

Re: Mandatory field and set focus does not work

Jump to solution
You missed some then. If moving it around to a different location or deleting other elements from the form worked, then there's some field, tab, label, input, or other form element missing its Name property...
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Mandatory field and set focus does not work

Jump to solution
interestingly, when I test this with another field, like assignee.to , it does work ...

anything to do with the fields being variable?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Mandatory field and set focus does not work

Jump to solution
At which format control you are using validations eg. Form level or master..
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Mandatory field and set focus does not work

Jump to solution
Hi BCP,

Form level.

Cheers
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Mandatory field and set focus does not work

Jump to solution
the main reason for the focus is not coming is as stated above that some elements don't have any name assigned to them.............
I would say push your validations to the master format control and see if it works.......
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Mandatory field and set focus does not work

Jump to solution
interestingly enough, it does work on the web client ... and that is what the end users use .. so left .. thanks to all participating in solution
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: Mandatory field and set focus does not work

Jump to solution

Hi @Jacob Heubner I have the same problem with HPSMv9.50. I have checked all objects on the form and named them. Do you know that I need to flush cache on Tomcat, delete work/localhost/... in there or it should work immediately?

Thanks,

Dino

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.