Where is the variable set, and how to find what it's resolving to ?

We have a user trying to submit a ticket on form. Which has a field as cost center. And user can enter some cost center to create ticket. User has a new cost center which they are trying to use to create a ticket, however form responds back only cost center belonging to so and so can be used to create this ticket.

In the format control , in validation, there is a check like

index(billto in $file, $G.CostCenter)=0

Validation field set as false

Message field set as "only cost center belonging to so and so can be used to create this ticket"

billto must be the form field

And I want to know where / how the list for variable $G.CostCenter can be updated , so user can submit a ticket

Parents
  • Suggested Answer

    0  

    $G.CostCenter is not an out-of-the-box global variable. If the person who customised it followed the standards, it should be available in the table globallist for you to update the list. It will be in the List Variable field or the Display Variable field of that table.

    Strange, you would have thought that person would have created a cost center form for the finance people to maintain the list of cost centers.

    NOTE: Any changes will not take place until you logoff and logon again as the global list is loaded at the point of login.

    Example:

    Best Regards,

    Jason

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to   

    Thanks for checking in.

    However it does not look to be in the global lists.

    I did a search using the *afind.string with file name as globallists , and with search string as CostCenter, there are no results. Is there anything else I can check to find out the details of this variable. 

    Also , the input is like this, for form, just fyi

    Input=billto

Reply
  • 0 in reply to   

    Thanks for checking in.

    However it does not look to be in the global lists.

    I did a search using the *afind.string with file name as globallists , and with search string as CostCenter, there are no results. Is there anything else I can check to find out the details of this variable. 

    Also , the input is like this, for form, just fyi

    Input=billto

Children
  • Suggested Answer

    0   in reply to 

    In windows client, turn on rad debugger. Go to the submit ticket form where the $G.CostCenter variable is been used.

    Run this command in the rad debugger. d $G.CostCenter.

    e.g.

    Check and confirm if the $G.CostCenter actually have a list of values. The index command is basically checking if the billto field value exists in that global variable. I want to rule out that someone created the validation rule but never completed the full creation of global variable $G.CostCenter and populating it with value. But SM should complain if $G.CostCenter does not exists. No harm in checking if the variable has values. If the global variable never have values, you can just remove the validation. 

    If it does have values, lets find out where it's hiding and where it's getting created.

    There is a better command than afind.string. There is afindAll. But do not run this in production as it check every tables and slow things down. Run it in dev or test environment which have the same customisation/code as production.

    Run afindAll for $G.CostCenter and it will show you every tables that references this string. Note: afindAll command crashes on some of my very old SM version test boxes. Hopefully, you do not encounter the same crash. No fix for the crash.

    Best Regards,

    Jason

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button