Highlighted
Absent Member.. Absent Member..
Absent Member..
226 views

How to display company name that an operator belongs to?

Hi, All

 

I would like to know the way how to display the company that an operator belongs to.

I guess I need to use a link and query, but I do not know how.

 

For example, an operatorA belongs to company A, operator B to company B.

When an operator A login, company A will being displayed as the default company that the operator A works for.

Likewise, when an operator B login, it shows company B. 

 

I am using SM9.40

 

Regards,

 

Shuta

0 Likes
2 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to display company name that an operator belongs to?

If multi-company mode is enabled in the System Information Record, login.DEFAULT format control automatically populates $lo.company with the default company value from the user's operator record at login. If you want this to take place without enabling multi-company, you could update the condition for the calculation to remove the check for $G.multi.

 

If you instead want to populate a company variable based on the user contact record, you could set a variable in login.DEFAULT referencing company in $file1 (on the queries tab, the contacts table is the first file query and retrieves the operator's contact record):

$lo.contact.company = company in $file1

 

You can use variable as the input for a caption if you just want to display it, or use it in FC calculations to set a field value.

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

Re: How to display company name that an operator belongs to?

I got a same requirement and tried in many ways but this worked for me

 

Format control-->table name(may be incident or probsummary)

javascript-->

fill Add:- true, display:- true, initial:-true

 

var contact = new SCFile("contacts")

var findcontact = contact.doSelect("operator.id=\""+system.record.contact_name+"\"")

if ( findcontact == RC_SUCCESS )
{

system.record.company=contact.company;

}

 

 

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.