The Zurich release has arrived! Interested in new features and functionalities? Click here for more

The following mandatory fields are not filled in:

sarosana
Kilo Contributor

Hi community,

I want to set focus on the mandatory field if it is not filled by the user after click on Save/Update button,

Please find the snapshot below,

find_real_file.png

Here I just want to focus the Resolution Code if it is not filled by the user.

Like that the focus should be set on the first mandatory field based on the error message.

How to do that?

Please help me.

Thanks,

AnnBel

14 REPLIES 14

Anna,




After conducting a short investigation on the matter, I may say that I am not sure where the Warning Message is specified.
I would think that there is a Client Script which is being "fed" by the UI Policies and UI Actions responsible for the Mandatory status of any fields -> whenever any UI Policies or Actions determine that their conditions are not met (there is an empty Mandatory field and in the same time the logged in user wants to perform an action: for example Save / Update) they notify the Client Script and it issues, to say so, the Warning Message to the specific form where the action (Save / Update) is being executed. Yet, after checking the Client Scripts I did not find such which contains such message "The following mandatory fields... ".
So I would conclude that these messages are hard - coded somewhere in the SNOW Platform, and as everything hard - coded - SNOW does not want a user to make any modifications on such elements. So, as Shiladitya said earlier - in regards to this specific matter you may contact HI Support. I am sure the guys there will be able to provide some clarification on the exact location of the messages.



In regards to another topic, which came to me from this discussion: How to ensure that you specify the order in which the Mandatory fields are being mentioned in the warning message: which first, second and 3th -> I believe this is up to the order in which you are adding the UI Policy Actions in the specific UI Policy for example. Also, if there are several UI Policies that are responsible for the Mandatory state of couple of fields -> then the Order of these UI Policy will also play part for the prioritization of the fields displaying. As to UI Actions -> I do not believe that you can combine the warning message for Mandatory not filled in fields that comes from UI Policy with the same warning message which comes from an UI Action.
Anyway, if you will decide to reach to HI Support, then you may also verify this with them.




Best Regards,
Georgi Mavrodiev



IT Consultant
Do IT Wise



You may visit us in our Web Site: www.doitwise.com


Anna,


Just to add to georgimavrodiev   note: if possible, make sure you are not causing an administrative overhead for yourself by showing or focusing the fields in a certain order. Requirements tend to change and evolve with the organization, and so today you might have a field mandatory and tomorrow it won't be, or some other field will become mandatory. You will then have to review your process and shift UI policies and whatnot to accommodate the change. Even if very well documented, you will still have to spend time running through the process.




harel


adityaghosh
Tera Guru

The above code will not work in Portal,



Regarding where the inbuilt code is



script include -> SysMessageAjax



the class used is GwtMessage , but I dont think this is editable



Please make helpful, if my answer was of any use


Hi Shiladitya Ghosh



Thank you for your reply.



May I know where this class "GwtMessage" class is defined.


For this code, you'll have to ask HI.



Its not recommended by SN to modify it..



What I understand you want to set the focus on fields which are mandatory and not filled in by user..


the issue with that is, in HTML you can set focus on one element at a time only..



e.g. you have four mandatory fields & all are empty, the internet browser will set focus on the last element/field and not all..