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

Can we use parent attribute context in Default Value in Dynamic Attribute?

mohitarora1
Regular Contributor
Regular Contributor

Hi Team,

We have a requirement to build a form for Contractors and Suppliers which would be both Create User and Update User type forms. Also, we have a requirement to let manager update an attribute for a new starter. This has to be Update User type only and should not be visible on Create User form. 

In order to achieve this, we have built a dynamic attribute where we are checking for the user's customproperty53, if it is not null, we are hiding Contractor/Supplier update forms.

So, We have created the below dynamic attribute and want the default value to be auto-selected and based on this value, the forms should be visible.

However, the default value query is not auto-populating the value.

Below is the query I am using for Values:

SELECT CASE WHEN customproperty53 is not null THEN 'YES' ELSE 'NO' END as ID from users where username=${username}

Apparently, ${user.id} is not working so we have pulled in username of the user and using it as a dynamic attribute.

If we keep the below query as Default Value query

SELECT 'YES' as ID

This auto populates the value and show/hide the forms accordingly, however, this is not what we want

Thanks,

Mohit Arora

3 REPLIES 3

SumathiSomala
All-Star
All-Star

@mohitarora1 I have tried to replicate this it is working as expected.

Default value populated correctly on update user request form.

SumathiSomala_0-1697635491682.png

 

SELECT CASE WHEN customproperty53 IS NOT NULL THEN 'YES' ELSE 'NO' END as ID from users where username=${Username}

 

 

${Username}-is parent dynamic attribute.

 

SumathiSomala_2-1697635595138.png

testda -Child DA

SumathiSomala_3-1697635657561.pngSumathiSomala_4-1697635693457.pngSumathiSomala_5-1697635714993.png

If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.

 

 

 

 

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

mohitarora1
Regular Contributor
Regular Contributor

for me, it did not work, however I tweaked a bit in the query.

 

SELECT CASE WHEN customproperty53 IS NOT NULL THEN 'YES' ELSE 'NO' END as ID from users where userkey=${requestee}

This is working for me, not sure what is the issue when I use username.

 

I have not changed anything else.

 

Thanks for your help.

Thanks,

Mohit Arora

@mohitarora1 If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.