Antoine_Sauteron_1266

Searching for AE objects

Discussion created by Antoine_Sauteron_1266 on Feb 24, 2017
Latest reply on Feb 24, 2017 by Antoine_Sauteron_1266
My request is about how can I search for AE objects like, Jobs, Logins,  Users, Groups, Workflows, etc. with the AE Script language, like in the  UI. I what to use search patterns like:
- RM.*
- type=User
- type=Folder AND DOTNET_*

As return value it would be great to have the object itself otherwise it would be ok to have the name of the object.

There is a JavaAPI Class "SearchObject" that should perform this task, but I don't think there is a script command / function that would allow you to do this.

You may also use a VARA.SQLI and couple it with a SCRI to define the search parameters.

Here is a short example:

SCRI.SEARCH.PARAM

:BEGINREAD
:READ &NAME#,,"Name"
:READ &TYPE#,"'CALE','CALL','CITC','CLNT','CODE','CONN','CPIT','DASH','DOCU','EVNT','FILTER','FOLD','HOST','HOSTG','HSTA','JOBF','JOBG','JOBI','JOBP','JOBQ','JOBS','JSCH','LOCA','LOGIN','LSYNC','PERIOD','PRPT','QUEUE','RCON','RESX','RSYS','SCRI','SERV','STORE','SYNC','TZ','USER','USRG','VARA','XREQ','XSL'","Type"
:ENDREAD

:SET &HND# = PREP_PROCESS_VAR(VARA.SQLI.SEARCH)
:PROCESS &HND#
:  SET &RESULT# = GET_PROCESS_LINE(&HND#,1)
:  P &RESULT#
:ENDPROCESS


VARA.SQLI.SEARCH

SELECT OH_NAME
FROM OH
WHERE OH_Otype='&TYPE#'
AND OH_Name LIKE '%&NAME#%'
AND OH_Deleteflag='0'


Of course it can be enhanced - it does not allow you to specify the client or select all object types - but it was just to give you guidelines on how this could be achieved.

Best regards,
Antoine

Outcomes