Conditional expressions are one of the most powerful tool in the hand of a skilled TPAE specialist. However, when things get complex it may be hard to track where all custom conditional expression are referenced in your environment. That's why I have spent some minutes developing a small set of SQL queries to list those references from the TPAE database.
First of all, conditional expressions are stored in the CONDITION table. The other tables that has reference to this table are:
- CTRLCONDITION/CTRLGROUP
- APPLICATIONAUTH
- SECURITYRESTRICT
- MAXDOMVALCOND
- CROSSOVERDOMAIN
CTRLCONDITION/CTRLGROUP
Conditional Expressions can be used into Application Designer through the 'Configure Conditional Properties' button. These conditions can then be used to set specific properties to a UI control.SELECT ctrlgroup.app, ctrlgroup.optionname, ctrlgroup.groupname, ctrlcondition.conditionnum FROM ctrlcondition JOIN ctrlgroup ON ctrlgroup.ctrlgroupid=ctrlcondition.ctrlgroupid JOIN condition ON condition.conditionnum=ctrlcondition.conditionnum WHERE ctrlcondition.conditionnum IS NOT NULL;
APPLICATIONAUTH
Applications SigOptions can be activated upon the evaluation of a Conditional Expression (see Security - Security Groups - Applications)The following query will list all the SigOption with a bounded conditional expression together with all the applications and groups.
SELECT a.app, a.groupname, a.optionname, a.conditionnum, c.expression, c.type FROM applicationauth a JOIN condition c ON a.conditionnum=c.conditionnum WHERE a.conditionnum IS NOT NULL;
If you are not interested in which group has access to a specific SigOption the following query returns a much shorter list.
SELECT a.app, a.optionname, a.conditionnum, c.description, c.expression, c.type FROM applicationauth a JOIN condition c ON a.conditionnum=c.conditionnum WHERE a.conditionnum IS NOT NULL GROUP BY a.app, a.optionname, a.conditionnum, c.description, c.expression, c.type;
After having identified the SigOption, you can check the application presentation XML to find the linked control.
SECURITYRESTRICT
Security restrictions can be applied to an object or an attribute and can be linked to a Conditional Expression (see Security - Security Groups - Select Action Menu - Global Data Restrictions)select * from SECURITYRESTRICT;
MAXDOMVALCOND
Conditions can be set on crossover domains (see System Configuration - Platform Configurations - Domains - ALN Domain)SELECT * FROM maxdomvalcond WHERE conditionnum IS NOT NULL;
CROSSOVERDOMAIN
Conditions can be set on crossover domains (see System Configuration - Platform Configurations - Domains - Crossover DomainSELECT * FROM crossoverdomain WHERE conditionnum IS NOT NULL;
Hi can we able to apply conditional expression on applications dialog box popup in maximo 7.5 , please let me know we are not able to get this ,
ReplyDeleteEx : pupup is view history dialogue box .
Thanks
rs
Hi,
ReplyDeleteIs it possible to put a condition on a ALNDOMAIN value (associated with and assetattribute) based on the value of another assetattribute?
also, is it possible to put a condition on an ALNDOMAIN value based on the classification selected on an Asset?
Thanks
Hi,
ReplyDeleteIs it possible to put a condition on a ALNDOMAIN value (associated with and assetattribute) based on the value of another assetattribute?
also, is it possible to put a condition on an ALNDOMAIN value based on the classification selected on an Asset?
Thanks
With this you can find all conditions
ReplyDeleteSELECT 'select distinct '
|| uniquecolumnname
|| ' as uniqueid, '''
|| uniquecolumnname
|| ''' as uniquecolumnname ,'
|| attributename
|| ', '''
|| attributename
|| ''' as attributename , '''
|| o.objectname
|| ''' as objectname from '
|| o.objectname
|| ' where '
|| attributename
|| ' is not null union' AS sqloutput
FROM maxattribute a
JOIN maxobjectcfg o
ON o.objectname = a.objectname
JOIN maxtable t
ON t.tablename = o.entityname
WHERE sameasobject = 'CONDITION'
AND sameasattribute = 'CONDITIONNUM'
AND o.persistent = 1
AND o.persistent = 1
AND o.isview = 0
AND a.persistent = 1
SELECT t.*,
c.expression ,
' select * from '
||t.objectname
||' where '
||t.attributename
||' ='''
||t.conditionnum
||''' ;' AS selectclause
FROM (
-- sqloutput from above in here
-- end sqloutput from above
)t
JOIN condition c
ON t.conditionnum=c.conditionnum
WHERE t.conditionnum in ('[CONDITION TO CHECK]') ;