ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.
732 views

Can Javascript modify properties of objects within a format?

Jump to solution

I've been trying to figure out a way to more clearly indicate that a fill has been completed successfully.  This is due to a large user base who are all "brand new" to Service Manager and who's prior ticketing system did not have the same requirement to click fill to complete "undisplayed" fields within the application.  I  and was hoping that someone has done something like the following:

 

In the Post Javascript tab of the link for the individual fill, I'd like to be able to call a routine that would modify the "Fill Button Image" for the comfill object on the form that called that link record.

 

If not possible to do this, is there some way to set validation on links from FC that would enforce a successful fill be completed on all comfill objects within a form before it can be saved/escalated/closed/etc?

0 Likes
1 Solution

Accepted Solutions
Fleet Admiral Fleet Admiral
Fleet Admiral

Hello,

Dont think that you will be able to call link at the save button. Regarding visual effect i wrote the way of doing that with some symbols (like accept symbol for OK buttons in the system) which will be displayed after clicking on the link.

View solution in original post

0 Likes
5 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral

Hello,

I am not sure why you want to force users to click on all comfills. Maybe will be enough to check in FC that the required fields are not null or contain valid data from target table? If you still want to do that as you described, you can do following:

In each link which is fired by the comfill button add information like $fieldx="true" where x can be randomly applied index of the field. Then in format control on validation set condition for all your $fieldx that they must be true either validation wont pass.

Or you can put on form some signs like symbol on OK button next to each field with comfill which will be not displayed until user  wont click on the comfill link (again you will need to set in each link line $fieldx=true and then use it for Display condition of the OK signs).

0 Likes

The intent is not to require fill on ALL, however there are some that are requried to fill to pull additional fields via the link to the individual record.  I understand how the temp variable would work in this regard, however I was hoping for some visual indication that the fill was completed during the click on the button.  As a follow-up question on this, is there some way to force the fill to occur during the Save of the record?

0 Likes
Fleet Admiral Fleet Admiral
Fleet Admiral

Hello,

Dont think that you will be able to call link at the save button. Regarding visual effect i wrote the way of doing that with some symbols (like accept symbol for OK buttons in the system) which will be displayed after clicking on the link.

View solution in original post

0 Likes
Absent Member.
Absent Member.
You can call us.link application in formatctrl on save. You can find examples on how to call it in online help or by entering do (displayoption) and entering us.link in application field and press search. HTH
0 Likes
Absent Member.
Absent Member.

You can do something like this:

 

Go to the format control of that tableand in the JS write:

 

function updateFill()

{

 //var incT=new SCFile("table_name")

 if (vars.field_name !=null || vars.field_name !="")

  {

   var rteCode=new SCDatum()

   var rc=system.functions.rtecall("callrad",rteCode,"us.link", new Array("name","prompt","string1"),new Array("field_name_on_which_you_have _to_perform_fill","fill","table_name"),false,true)

//table_name.doUpdate()

  }

}

updateFill()

 

But i guess you have to perform this on each fill button which might be quite hectic task. Otherwise you can put this code in fc on Add. So that if all the mandatory fields has been filled then on submission above rtecall gets executed and values in the fill button field will get filled.

 

Same you can do at the updation of the record.

 

 

 

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.