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 , pass string as date in default value

AJ23494
New Contributor II
New Contributor II

Hi Experts , 

I have a dynamic attribute field of type date which for Endpoint request form . By default it is picking the current date . 

I want to change the default value to CP55 which is a string in the format yyyy-mm-dd . 

I tried using the following combinations in the default value but no luck .It's gives me invalid date error on the UI by default .  Please suggest . 

SELECT CAST(CUSTOMPROPERTY55 AS DATE) AS DATE FROM USERS WHERE USERKEY = ${requestee}

SELECT STR_TO_DATE(CUSTOMPROPERTY55, %m/%d/%Y') AS DATE FROM USERS WHERE USERKEY = ${requestee}

SELECT CONVERT(${CUSTOMPROPERTY55}, DATE) AS DATE FROM USERS WHERE USERKEY = ${requestee}

 

6 REPLIES 6

AJ23494
New Contributor II
New Contributor II

@rushikeshvartak  @Sivagami  @Manu269  : Please suggest 

AJ23494
New Contributor II
New Contributor II

 

Getting this error in logs
Exception while executing default sql query javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet and query is 14 "
"arsms","2023-06-29T11:44:04.450+00:00","2023-06-29T11:44:04.363430673Z stdout F 2023-06-29 11:44:04.363 DEBUG [traceId=aa26d8dba61deae5, spanId=aa26d8dba61deae5, spanExportable=true, X-Span-Export=true, X-B3-SpanId=aa26d8dba61deae5, TENANT_ID=DEFAULT, X-B3-TraceId=aa26d8dba61deae5] 7 --- [http-nio-8787-exec-3] c.s.s.a.s.impl.EndpointsServiceImpl : checking if DA is of drop-down-type "
"arsms","2023-06-29T11:44:04.450+00:00","2023-06-29T11:44:04.363445073Z stdout F 2023-06-29 11:44:04.363 DEBUG [traceId=aa26d8dba61deae5, spanId=aa26d8dba61deae5, spanExportable=true, X-Span-Export=true, X-B3-SpanId=aa26d8dba61deae5, TENANT_ID=DEFAULT, X-B3-TraceId=aa26d8dba61deae5] 7 --- [http-nio-8787-exec-3] c.s.s.a.s.impl.EndpointsServiceImpl : checking if DA is of drop-down-type "
"arsms","2023-06-29T11:44:04.450+00:00","2023-06-29T11:44:04.363447373Z stdout F 2023-06-29 11:44:04.363 DEBUG [traceId=aa26d8dba61deae5, spanId=aa26d8dba61deae5, spanExportable=true, X-Span-Export=true, X-B3-SpanId=aa26d8dba61deae5, TENANT_ID=DEFAULT, X-B3-TraceId=aa26d8dba61deae5] 7 --- [http-nio-8787-exec-3] c.s.s.a.s.impl.EndpointsServiceImpl : attribute type other then drop down options :::: SELECT STR_TO_DATE(U.CUSTOMPROPERTY55, '%Y-%m-%d') as ID FROM USERS U WHERE U.USERKEY= ${requestee} "
"arsms","2023-06-29T11:44:04.450+00:00","2023-06-29T11:44:04.364468572Z stdout F 2023-06-29 11:44:04.364 DEBUG [traceId=aa26d8dba61deae5, spanId=aa26d8dba61deae5, spanExportable=true, X-Span-Export=true, X-B3-SpanId=aa26d8dba61deae5, TENANT_ID=DEFAULT, X-B3-TraceId=aa26d8dba61deae5] 7 --- [http-nio-8787-exec-3] c.s.s.a.c.RequestAccessController : getRequestForm-controller-time :: 44 "

rushikeshvartak
All-Star
All-Star

Alias should be id


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

@rushikeshvartak  i tried using 

SELECT STR_TO_DATE(CUSTOMPROPERTY55, %m/%d/%Y') AS ID FROM USERS WHERE USERKEY = ${requestee}

AJ23494_0-1688039647482.png

Invalid date format is showing 

 

 

Thanks & Regards

Ankit Jindal 

TOMPROPERTY55, %m/%d/%Y') AS ID FROM USERS WHERE USERKEY = ${requestee} but no luck 

 

 

This is not configurable as its date picker 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Manu269
All-Star
All-Star

Dynamic Attribute of Type Date seems does not allow any option to fetch the data either from User Profile or to perform any kind of validation in ARS request form.

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