- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 01:58 PM
Hello All,
I need to add the suggestions on the Emp Code fields based on the combination of First Name and Last Name initials along with 3 digits to select for the new user.
How can I achieve the suggestions underneath the Variable field?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 06:13 PM - edited 12-27-2023 06:19 PM
Hi @kpanchal, You can try with the onChange client script on variable name 'lastName' to get the dynamic suggestions and you need to make sure the value in lastName is entered. You can probably make the Id field readOnly untill the last is populated.
Dynamic Option:
onChange Client Script:
Static Options:
You can try with example text on the variable form or show the field message using the catalog client script.
Client Script:
Regards,
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 02:18 PM
@kpanchal : You want to add static suggestion "based on the combination of First Name and Last Name initials along with 3 digits" or is there any dynamic logic behind it? Could you elaborate to help better.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:28 PM
I want dynamic code suggestions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:45 PM - edited 12-27-2023 04:45 PM
@kpanchal : Could you elaborate your ask with an example on how we will get the dynamic suggestions so that we will be able to help you better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 06:37 PM
Hi @Sainath N ,
My Scenario is:
Scenario Description:
For employees associated, existing employee codes adhere to the AA99 format. If an existing employee leaves and returns within 400 days, they will regain their previous employee code in the AA99 format.
For new employees requesting an employee code for the first time, the following criteria must align:
1. Provide code suggestions.
2. Generate a new code in the AA999 format.
3. Once a suggestion is offered, the code remains reserved until the employee either submits or selects a different code.
Acceptance Criteria:
Fields:
- Status: Free/Reserved/Assigned/Blocked/Completed
- Employee Code: Unique key combining AA99 (for old employees) & AA999 (for new employees). It will include the employee's first and last name initials. (EMP CODE = FIRST INITIAL + LAST INITIAL + 2/3 DIGITS)
- Employee ID: Reference field to Sys ID
- Date: Readonly once code allocation occurs
- SN Fields: Basic fields
- Name: FreeText
Conditions:
For Old Employees:
- If an employee previously had an EMP code, leaves RCGT, and returns within 400 days, they will retain their original EMP code.
For New Employees:
- Upon meeting criteria, additional conditions apply:
1. STATUS remains locked at RESERVED if the user selects a code from suggestions but does not submit.
2. STATUS changes to RELEASE if the user fails to submit within a one-hour period.
3. STATUS changes to ASSIGNED once the user submits and the code is allocated.
4. STATUS changes to Terminate if the employee leaves and does not return within 400 days.
Note: Reserved codes will be released back into the suggestion pool if the user selects a different code after initially choosing one and not submitting it.