Aditya_K_Infy Absent Member.
Absent Member.
421 views

Mapping of fields for $ file in Format control

Hi,

We are implementing a functionality  within Incident management by which a popup window will be generated that will help user select an assignment group from a list and populate in incident ticket.

We need to map database fields in $file so that the fields of Incident table (probsummary) can be called and operated upon in JavaScript. Field should be accessible from JavaScript to perform popup window operation.

I don't know how to map the database fields to $file in Format Control (fc command) for probsummary.

Should that be done in Initiatilzation tab or subroutine tab where we call RAD Functions. We also need to know where $file values are stored. Please check and assist, We need information on this ASAP.

 

 

 

Tags (3)
0 Likes
3 Replies
Absent Member.. John Stagaman Absent Member..
Absent Member..

Re: Mapping of fields for $ file in Format control

There is not an explicit "mapping of fields" as described. 

When interacting with a record, at anytime format control is invoked, when using RAD syntax all fields in the current record are referred to as fieldName in $file ($file is saved in memory and is the file variable against which format control executes). When executing JavaScript called inline from format control, references to fields in the record use the format system.vars.$_file.FIELDNAME.

Note that depending on the application called, the file variable varies. Most document engine applications use the file variable $L.file (not $file). So you reference a file variable differently: fieldName in $L.file, or in JavaScript as system.vars.$L_file.FIELDNAME.

$L.file      Used for all document engine objects and related tasks, such as data policy, notification engine, alerts, RAD expressions in process designer rules, etc. 

$file        The file variable used by format control.

$File        The file variable used by links

$L.filed      The file variable used by the Display Application (historically). As HPSM has been updated you can increasingly use $L.file for display objects, but you'll see both used. 

For example, the following references the update.action field in the probsummary (Incident) record.

system.vars.$L_file.update_action

 Note that you can also pass a single field or the entire record into a JavaScript function which can alter how you reference it in the script itself.

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
0 Likes
Aditya_K_Infy Absent Member.
Absent Member.

Re: Mapping of fields for $ file in Format control

I have a text field on a form in SM, and I am trying to utilize the input text in it using statement like --

var sitescope=system.vars.$_file.SiteScope.caption ;    (SiteScope is name of text field in the form.)

print("site= ",sitescope) ;

However it is printing as site=null.

It is not accepting the value (caption) entered in the textbox named SiteScope.

Please advise and assist on how do I capture the text box value into a field in JavaScript for computing ?

 

Tags (2)
0 Likes
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Mapping of fields for $ file in Format control

What the end result you want to get (what should happen on the screen) and what has been done?

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.