Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

dynamic Attribute.

Rajatlm10
New Contributor III
New Contributor III

Hi , 

we have a requirement that if user select a country in DA "country" then corresponding country code value should pop up in the other DA "countrycodes" which will be not editable. 

Also country is a single select and countrycodes can be multi select. like for a single country there can be multi country codes selected. 

for exp:

when user selects country as united states then countrycodes should show as US-001. 

when user select country as Albania then countrycodes should show as AL-008.

 

 

i am using the below query to achieve the same but its not working. 

select id case when ${Country}='united states' Then 'US-001' when ${Country}='Albania' Then 'AL-008' END as id

 

Has anyone worked on something like that ?

3 REPLIES 3

PremMahadikar
Valued Contributor II
Valued Contributor II

Hi @Rajatlm10 ,

As I understood your usecase -

  1. If user select a country in DA "country" then corresponding country code value should pop up in the other DA "countrycodes" which will be not editable. 
    • The above is achievable
  2. Also country is a single select and countrycodes can be multi select. like for a single country there can be multi country codes selected. 
    • Using select case statements selecting single country wouldn't pop-up multi select country code. Because case statement once executed wouldn't check for next one.
    • To achieve this, upload country and country code mapping in to datasets and pull that inside dynamic attribute. Here multi select works as you not using case inside select.
  3. The query you mentioned is wrong (select id), use below
select case when ${country}='United States' then 'US-001' when ${country}='Albania' then 'AL-008' end as id from dual

The dynamic attributes looks like below:

1. Parent Attribute: Country

Attribute Namecountry
Attribute TypeSingle Select From SQL Query
RequiredCheck
EditableCheck
What action to perform when Parent attribute changes?Mapping

2. Child Attribute: Country Code

Attribute Namecountrycode
Attribute TypeSingle Select From SQL Query
Valueselect case when ${country}='United States' then 'US-001' when ${country}='Albania' then 'AL-008' end as id from dual
Default Valueselect case when ${country}='United States' then 'US-001' when ${country}='Albania' then 'AL-008' end as id from dual
Parent Attribute
country

PremMahadikar_2-1716415102167.pngPremMahadikar_3-1716415126148.png

Refer the links below to use dataset in your queries:

https://forums.saviynt.com/t5/identity-governance/multi-select-in-dynamic-attribute/m-p/90910

 

If this helps your question, please consider selecting Accept As Solution and hit Kudos

PremMahadikar
Valued Contributor II
Valued Contributor II

@Rajatlm10 ,

Did the above solution work?

@PremMahadikar 

Thank you so much for the detailed explanation. Its working fine. 

I guess i was missing the FROM keyword from the query. 

 

Thanx!