- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:04 AM
Hi Guys,
I have two date/time variables with names campaign_start_date and campaign_end_date on the catalog item view.
I need to check if the campaign_end_date is less than campaign_start_date, I need to clear campaign_end_date value and show a field message.
is there a way to do that using the Catalog UI policy? if yes, please help me out using the catalog UI Policy because it is my first preference.
if not, could you please provide me with the catalog client script code?
thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 07:49 AM
I am using Catalog UI Policy.
Condition: compaign_start_date is more than 0 Hours after compaign_end_date
Script: g_form.clearValue('compaign_end_date');
g_form.showFieldMsg('compaign_end_date', 'End Date must be at or after start date.', 'error', true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:25 AM
Try like below images.
Refer to below article for better understanding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:33 AM
HI, nothing is happening using this.
could you help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:03 AM
Well, it is working for me. May be, you can share what you have tried or go through the above article.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:27 AM - edited 10-27-2022 06:29 AM
Actually, I am working on the catalog UI policy, did you try it there?
I have added campaign_end_date is more than 0 hours after campaign_start_date (it's wrongly written in the picture) and also I tried with campaign_start_date is more than 0 hours after campaign_end_date