and more in a single search tool across platforms. Read the announcement here. |
10/18/2023 05:53 AM
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
Solved! Go to Solution.
10/18/2023 06:31 AM
@mohitarora1 I have tried to replicate this it is working as expected.
Default value populated correctly on update user request form.
SELECT CASE WHEN customproperty53 IS NOT NULL THEN 'YES' ELSE 'NO' END as ID from users where username=${Username}
${Username}-is parent dynamic attribute.
testda -Child DA
If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.
10/18/2023 06:42 AM
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
10/18/2023 06:52 AM
@mohitarora1 If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.