cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use SDML to set Global values accessible at runtime

agentry_src
Active Contributor
0 Kudos

[Migrated from the Syclo Resource Center]

brendanbell   09/29/2011 16:51,

I would like to be able to retrieve the value of a Global variable from an application table (MAXVARS) during the Transmit, then store the global variable for use by the application at runtime either in Screens or Rules.For example, I have a HTTP URL to an external system that is going to change at some point in the future. I am already storing this URL value in MaxVars for our Maximo direct users. When this URL changes in the future, we simply have to update the MAXVAR record, and the link gets updated in the Maximo screen.I would like to accomplish the same thing in Agentry, so that when the URL needs to be updated, I don't have to publish an update to the application. Any suggestions?

Jason Latko   09/29/2011 17:51

We do a variation on this in the base SMART for Maximo Work Manager product.

  In your sqlbe.ini file in your server directory, there are hooks set up to call a sql script to handle this:; Queries to read Globals, Localization, and Enables for everyone[ApplicationGlobals]q1=GetMaximoStringLengthGlobals.sql; Queries to read Globals, Localization, and Enables for a user[UserGlobals]Put your script in the sqlbe server folder.

  The product uses ApplicationGlobals which will override them for everyone and will run every transmit.

  You can also set it up under UserGlobals and just override for the user running the query.

  Here is an example of what your query must return:SELECT --Get the simple globals that do not require extra manipulation

   s.globalgroup, s.globalname, s.length AS global, s.lastupdateFROM

   some table slastupdate is required so Agentry knows if this global has been modified against the lastupdate stored internally in Agentry for this global.So if I want to update a global called: Lngth.WorkOrder, I would return 'Lngth' as globalgroup, 'WorkOrder' as globalname, 25 as global (or whatever length I want to set it to)

Jason Latko (Senior Product Developer at Syclo)

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I would like to create a global variable in the agentry application and then access the global variable from a transmit in a .sql file either as a flunky or global variable.

I understand we have userglobals and I can run the select from the sqlbe.ini but my question is - how do we access the globals on a transmit in a .sql file once the are populated?

Former Member
0 Kudos

To access it later in the transmit use <<user.info.name>>

The name will be the column name that is used on the User Global script.

Stephen

jason_latko
Advisor
Advisor
0 Kudos

Keerthi,

To access globals set up in the editor from your sql script, just use standard flunky syntax.  If you have a global called Text.Message1 set up in the editor, just use <<Text.Message1>> in your script to access it.  Keep in mind that globals are not available to be used in some scripts that are run during login validation and others that Agentry uses, but for standard transaction handling in update and data state steps that are kicked off by user actions and fetches, you should be good.

Jason Latko - Senior Product Developer at SAP