on 11-17-2014 6:24 AM
Hi All,
I want to read context variables value in parameter area of 'To Database' pass and Condition part of the 'Switch Task'.
I have used following code to the context values, it is working on 'To Generic' Pass but not in To Database Pass and Switch task.
$function.uGetContextVar(GUID)$$
Please help me to resolve this issue.
Please check the attachments for more information.
Regards,
Venkatesh
Hello Venkatesh,
the javascripts are not working everywhere.
For this case you could use the DB-view which contains the context-variables instead.
The SQL would look like this:
select MX_ASYNC_ORIG_OPERATION FROM central_inbox_trans WHERE GUID = (
select VarValue from MXPV_Audit_Variables where varname = 'yourCTX-Variable' and AuditID = %AUDITID%)
I hope this solves your issue.
Best regards,
Gunnar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you calling a built-in function from IdM API in the screenshots or do you have your own function called uGetContextVar?
For the %AUDITID% being empty I would have tried to create a wrapper aroudn the uGetAuditID()-function but if the original problem is that the script is not called I am not sure anymore. What happens if you place uWarnings to the script? Will there be output in job log or not?
For the audit id being empty in query:
select MX_ASYNC_ORIG_OPERATION FROM central_inbox_trans WHERE GUID = (
select VarValue from MXPV_Audit_Variables where varname = 'yourCTX-Variable' and AuditID = %AUDITID%)
I would have tried:
select MX_ASYNC_ORIG_OPERATION FROM central_inbox_trans WHERE GUID = (
select VarValue from MXPV_Audit_Variables where varname = 'yourCTX-Variable' and AuditID = $function.zGetAuditId()$$)
function zGetAuditId(Par) {
var auditId = uGetAuditID();
return auditId;
}
regards, Tero
I believe Gunnars answer should work well for the switchtask, while your To Database pass needs to use the function, but the return value needs to have quotes around it as the GUID is a string.
select MX_ASYNC_ORIG_OPERATION FROM central_inbox_trans WHERE GUID = '$function.GetAuditId()'
Also make sure that the RT account/role has access to the central_inbox_trans table.
Br,
Per Christian
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.