Hide the delivery date and estimated delivery if no value

Jet R
Tera Contributor

How can I hide the Estimated Delivery and Delivery Date fields if there are no value. The delivery time in catalog item is 0 days. I am looking at the widget SC_Order_Status but not sure where to edit here.  I know there is a check box in the catalog item to hide the delivery date, but would it be possible to configure it the widget level?

 

Anyone who implemented same before? Please help. Thanks

Screenshot 2023-08-02 141954.jpg

1 ACCEPTED SOLUTION

@Jet R 

after cloning you can update this line to hide it if empty

line number 36

<div class="text-muted" ng-if="::options.display_delivery_date == 'true' && data.request.show_estimated_delivery!='' ">
${Estimated Delivery} : {{::data.request.show_estimated_delivery ? data.request.esimated_delivery : '--'}}
</div>

AnkurBawiskar_0-1690974902176.png

 

Similarly do in the next few lines where they are rendering it as table

AnkurBawiskar_1-1690974943100.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Jet R
Tera Contributor

HI @Ankur Bawiskar can I ask for your help here? Thanks.

@Jet R 

could you share which page it is in browser?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Jet R 

I know there is a checkbox for this on Item level but not sure if that checkbox is being used in the widget to render that.

Did you check the script for that widget?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur, 

here's the link of the page

/sp_config?id=page_edit&p=order_status&table=sp_instance&sys_id=664e28ce9f4332002528d4b4232e702c

 

JetR_0-1690974209924.png