and more in a single search tool across platforms. Read the announcement here. |
01/11/2024 12:58 AM
Hi Team,
We have configured a child attribute displayname in the Register User Form with the help of concat(${lastname},' ',${firstname}) but the display name attribute is not auto-populating.
Query : select distinct concat(lastname," ",firstname) as ID from users where username=${username}
Solved! Go to Solution.
01/11/2024 01:24 AM
Hi @draut
Please confirm if the same query is giving results in data analyzer with hardcoded username.
Also please check the error message in the logs at the time of opening create user page.
Regards,
Dhruv Sharma
01/11/2024 01:38 AM
Not sure how it will give the result in the data analyzer since the user record is not present yet, I will check the logs.
01/11/2024 01:53 AM
2024-01-11T15:13:51+05:30-ecm-2024-01-11T09:43:51.236042137Z stdout F 2024-01-11 09:43:51,235 [http-nio-8080-exec-5] DEBUG workflow.JbpmworkflowmanagementController - finalQuery--select ID as ID from (select distinct concat(lastname," ",firstname) as ID from users where username='F0000209') as T order by ID
01/11/2024 02:13 AM
It might be throwing an error in the logs post this query is executed. Can you check and share that error.
01/11/2024 02:40 AM
It does not give any error, got just the above message
01/11/2024 02:42 AM
If you suggest any other query to populate the display name using firstname and lastname please provide
01/11/2024 08:06 PM
Share full dynamic attribute screenshot for first name & last name
01/11/2024 10:15 PM
Lastname :
01/11/2024 10:40 PM
Hi @draut
1. Displayname is being calculated based on the dynamic value of username, hence you should use username as the parent attribute in displayname attribute. However you have kept lastname as parent attribute.
2. In the lastname attribute, there is no parent attribute hence you should not use Refresh there.
Please try once post correcting these two and let me know the results.
Regards,
Dhruv Sharma
01/12/2024 02:39 AM
I updated the configuration but got same message "No Match Found "
DEBUG workflow.JbpmworkflowmanagementController - finalQuery--select ID as ID from (select distinct concat(lastname," , ",firstname) as ID from users where username='F0000210') as T order by ID
01/14/2024 06:19 PM
use Mapping instead of refresh
01/15/2024 02:36 AM
Tried but it's not working
01/15/2024 05:38 PM
01/15/2024 11:26 PM
Hi @draut
From the logs, I can see that it is executing like below.
finalQuery--select ID as ID from (select distinct concat(lastname," , ",firstname) as ID from users where username='F0000210') as T order by ID
However, when the user is being created newly, firstname and lastname is also being fetched dynamically hence please try with ${firstname} and ${lastname} in the query and see if it works. Please share the logs when query is executed.
Regards,
Dhruv Sharma
01/16/2024 04:47 AM
Hi @rushikeshvartak ,
Thanks for the suggestion.
Can you please confirm, if I am using correct syntax
Value : select concat('${firstname}'',''${lastname}') as ID
Validation : ${displayname==(firstname+' '+lastname)}
01/16/2024 05:15 AM
Yes. Can you keep dynamic attributes name different ( add dyn in start)
01/16/2024 06:29 AM
Hi @draut
As suggested previously, could you please try with ${firstname} and ${lastname} in the query instead of firstname and lastname and confirm if it works.
Regards,
Dhruv Sharma
01/16/2024 10:43 AM
Mapping does not work in String Attribute Type
01/16/2024 10:09 AM
@draut Firstname and lastname are String type of attributes, hence it is not generating event for the child attribute displayname to get triggered. Here is how we have achieved this, we created another dynamic attribute of Sql Enum Type with query Select 'Yes' as ID concat Select 'Regenerate On Name Change' as ID and mapped this as a parent of displayname.
Thanks,
Mohit Arora
01/16/2024 10:15 AM
Correct Query we have used: select 'Yes' as ID union select 'Regenerate on Name Change' as ID
Thanks,
Mohit Arora
01/17/2024 02:32 AM - edited 01/17/2024 03:15 AM
01/17/2024 02:50 AM
Hi @mohitarora1
Thanks, it worked,
Used this query as per my need.
SELECT CONCAT(${lastname},',', ${firstname}) AS ID
Regards,
Dheeraj
01/17/2024 03:44 AM
@draut If you find the response useful, kindly consider selecting Accept As Solution
Thanks,
Mohit Arora