- 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-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