- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2024 11:04 PM
If the field is empty, then the value must be nothing.
Preferred First Name = ""If the field is not empty, then the value must include the quotation marks ("").
Preferred First Name= '"Preferred First Name"'
please help me on this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-14-2024 08:08 AM
Hi there @poco
Good question and I think you can do this with a client script in the catalog item to populate the value of the catalog variable accordingly
function onLoad() {
var preferredFirstName = g_form.getValue('preferred_first_name'); variable name
if (preferredFirstName) {
g_form.setValue('preferred_first_name', '"' + preferredFirstName + '"');
} else {
g_form.setValue('preferred_first_name', '');
}
}
If this helps kindly accept the response thanks much.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
ļ Microsoft MVP (AI Services), India
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2024 11:09 PM
where and why ?
āļø Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2024 11:12 PM
Hi Sohail
I need to populate like this in "Preferred First Name"' value in service catalog variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2024 11:16 PM - edited ā03-13-2024 11:17 PM
use like this in client script , + ''+ prefered first name +''+
Can you explain your requirement clearly ? were when how etc...
āļø Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-14-2024 07:15 AM
suppose user submit the catalog form request "prefered first name " is choice question and optional suppose user fill the that field the value between quotation mark other wise blank