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

  • Suggested Answer

    $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

  • 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

  • Suggested Answer

    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

  • Sorry , but is there a way I can access the RAD debugger on web client? It's SM 9.3/9.4 

    I already tried *findAll , but SM terminating my session stating that I am inactive, not really sure if search is crashing, or it's actually due to idle timeout setting that we have(3minutes idle would make session to be terminated) , I may try this one by adding my Id on exclude from session timeout, but on weekend, as findAll might cause additional stress on system? I did check logs , it was like 1204 of 1208 searches not found, so like 4 were already matched, I could not see which were match.

  • Rad debugger is only available in windows client. You can use newer windows client like 9.5, 9.6, maybe 9.7 with older 9.4x but not the latest 9.8 as its no longer compatible. Other possibility is adding a script line during submit ticket process to printout the values of $G.CostCenter but I'm not a developer so not sure how to do that.

    I have only ever used afindAll on windows client and had no issue with timeout or checking the results. Only issue was crashing on one of my older test machine. Never fix it so not sure if its my dodgy test data and changes or other reasons.

    Or you can add a special debugging servlet on a new port with longer timeout and websession timeout and connect your web client to the new port. Not possible if you have HW Loadbalancer in place, security or Apache restrictions. Maybe be possible in dev/test environments if it is less restrictive or have less functionalities.

    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