Archive for September, 2010

How to list all ActiveLinks, Filters, and Escalations that use a process command

Saturday, September 18th, 2010

The following SQL queries will return the Schema name and the command that has been defined.

SELECT actlink.name, actlink.actlinkid, actlink.enable, actlink_process.command
FROM actlink INNER JOIN actlink_process ON actlink_process.actlinkId = actlink.actlinkid
ORDER BY actlink.Name
;

SELECT filter.name, filter.filterid, filter.enable, filter_process.command
FROM filter INNER JOIN filter_process ON filter_process.filterId = filter.filterId
ORDER BY filter.Name
;

SELECT escalation.name, escalation.escalationid, escalation.enable, filter_process.command
FROM escalation INNER JOIN filter_process ON filter_process.filterId = escalation.escalationId
ORDER BY escalation.Name
;

How to determine if a field contains a number or text

Saturday, September 18th, 2010

If you are using a character field to hold numbers, how do you test to ensure that the value entered actually contains only a set of numbers and not mixed with text. There are a number of ways to accomplish this with workflow. The following is the most simple method:

Run If: ‘chr_Number’ LIKE “%[^0-9]%”
Action: Message Error

This will match non-digit characters.

Reset NextID

Saturday, September 18th, 2010

In order to reset the ‘RequestId’ field’s value, you must update the ‘nextId’ field in the ARSystem’s “arschema” table. Note that if you have records in the table you are making the change on, ensure that the value you set is higher than any value already being used. If you don’t, you will run into unpredictable results.

The syntax is:

UPDATE arschema SET nextId=<value> WHERE name=’<schema name>‘;