Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How to add if else condition in bcc based on regioncode condition,###email is not triggerring

GitaGupta
New Contributor II
New Contributor II

Code:
<%if(( user?.regioncode?.equals('NAZ'))) print "abcd.pasila@pqr.com,xyz.bangera-ext@prq.com" else print ""%>

17 REPLIES 17

NM
Honored Contributor III
Honored Contributor III

@GitaGupta try this 

<% if(user.regioncode.equals('NAZ')) print "abcd.pasila@pqr.com,xyz.bangera-ext@prq.com" else print "" %>


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

GitaGupta
New Contributor II
New Contributor II

Tried , but email did not triggered.
Any more suggestions please

NM
Honored Contributor III
Honored Contributor III

@GitaGupta share logs..


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

GitaGupta
New Contributor II
New Contributor II

Have attached logs

[This message has been edited by moderator to mask sensitive information]

NM
Honored Contributor III
Honored Contributor III

@GitaGupta text file please

And is email address valid?


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

GitaGupta
New Contributor II
New Contributor II

Yes email id is valid.

NM
Honored Contributor III
Honored Contributor III

@GitaGupta are you send the email from analytics?


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

GitaGupta
New Contributor II
New Contributor II

Yes and that query is returning 5 records for dry run

NM
Honored Contributor III
Honored Contributor III

@GitaGupta use sample 

${ANALYTICSDATA.'column name of region code in analytics'[i]}

Region code - should be present in query.


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

GitaGupta
New Contributor II
New Contributor II

We are using this query and it is returning countable records
SELECT USERNAME,EMAIL,STARTDATE,COUNTRY,REGIONCODE,EMPLOYEETYPE,CUSTOMPROPERTY34 FROM USERS WHERE REGIONCODE='NAZ' AND COUNTRY='US' AND EMPLOYEETYPE='Managed Contractor';

NM
Honored Contributor III
Honored Contributor III

@GitaGupta yes but records are different so you have to have the above expression.


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

GitaGupta
New Contributor II
New Contributor II

If possible , Can you please frame the query as I am not getting it.

NM
Honored Contributor III
Honored Contributor III

@GitaGupta <% if (user.secondaryManager) print "${test1}" else print "${manager.email}" %>

This is what we are using and it is working.


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

alvian
Regular Contributor
Regular Contributor

try this
<%if (user.regioncode == "NAZ") print "abcd.pasila@pqr.com,xyz.bangera-ext@prq.com" else print "" %>

GitaGupta
New Contributor II
New Contributor II

Have tried but its not working.

alvian
Regular Contributor
Regular Contributor

I think you need to put <space> after coma 
"abcd.pasila@pqr.com, xyz.bangera-ext@prq.com"

rushikeshvartak
All-Star
All-Star
<%if(( user?.regioncode?.equalsIgnorecase('NAZ'))) print "abcd.pasila@pqr.com, xyz.bangera-ext@prq.com" else print ""%>

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.