Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Statuskey on Update User Form

jezzanuena
Regular Contributor
Regular Contributor

Hi! I was trying to display the Statuskey of the user in the Update User Form and be able to update it as well. The below queries worked as expected:

Default ValueSELECT statuskey as ID from Users u where u.userkey=${requestee}
ValuesSELECT distinct statuskey as ID from Users u

But instead of 1 and 0, we need to show them as Active and Inactive. Values work just fine using below query:

ValuesSELECT distinct CASE WHEN statuskey = 1 THEN 'Active' else 'Inactive' END AS id FROM users;

But as for the Default Value, which should show the current status of the user to be updated, the query below is not working and it returns blank result in the User Update Form:

SELECT CASE WHEN statuskey = 1 then 'Active' else 'Inactive' END AS id FROM users u where u.userkey=${requestee}

Can anyone suggest the right query for this requirement? TIA.

3 REPLIES 3

avinashchhetri
Saviynt Employee
Saviynt Employee

@jezzanuena,

I do not think that the default values for a Single Select SQL query is auto populated in the form. You could try and see if Multiple Select from SQL instead of Single Select work for you.

 

 

Regards,
Avinash Chhetri

Manu269
All-Star
All-Star

The default values for a Single Select SQL query is not auto populated in the form.

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Olesia
Regular Contributor
Regular Contributor

Hi,

you can set a "User Column" and then you don't need a default value at all as the data from the users table will be populated there.

Olesia_1-1669279814653.png

You can also use an inlinedescription to show the description of the values:

SELECT DISTINCT statuskey AS ID,
CASE
WHEN statuskey = 1 THEN 'Active'
ELSE 'Inactive'
END AS inlinedescription
FROM Users

Olesia_0-1669279760020.png