How to show field message info for each of select box in a sub category .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2020 07:35 AM
How to show field message info for each of select box in a sub category .We have 40 select box .
if sub category = A then message "test a"
B = Message is "test b"
c = "Test c"
like 40 selection is there .
Regards, Please suggest
- Labels:
-
Procurement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2020 08:24 AM
Hello Sadashiva,
You could create onchange Catalog Client script for catalog item. where variable is your sub category.
in script write the script.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var messgae = "This is a messgae " + newValue;
g_form.showFieldMsg('location', messgae, 'info');
}
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2020 08:29 AM
Hi Sadashiva,
Please copy and paste the below code in your client script, you will get the desired output.
Type: onChange
Field name: <name of the choice field>
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Replace u_custom_choice with your choice field name
g_form.showFieldMsg('u_custom_choice','Test '+newValue,'info');
}
If I was able to resolve your issue then please mark as Correct and Helpful.
Regards,
Subhojit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2020 09:00 AM
Hi,
You need to write onChange client script for this.
Please use below script it will help you
You will get below results
1. If you select CPU in subcategory field
2. If you select DB2 in subcategory field
3. If you select the IP address in subcategory field
4. If you select mouse in subcategory field
5. If you select Antivirus in the subcategory field it will not show any info message why because we have not mentioned it in the script.
Hope this helps!
If you have any more questions, please let me know.
If I have answered your question, please mark my response as correct and helpful.
Thanks,
Sriram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2020 11:06 AM
Hi Sadashiva,
If I have answered your question, please mark my response as correct and helpful.
so that this thread can be closed and others can be benefited by this.
Thanks
sriram