Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
MjDeck
in reply to: azad.akbari

Here's code to remove the decimal places from the mass. It will also add a 'g' (meaning grams).

{{{(topComponent['Mass'].toFixed() + ' g') || "" }}}


The following will convert the Design Status to text:

{{{(topComponent['Design Status'] == 2 ? 'Pending' : (topComponent['Design Status'] == 3 ? 'Released' : 'Work In Progress'))}}}


The following can be used to remove the time from a date property. It does it by removing the blank (specified by \s) between the date and time, and everything after the blank.

{{{ topComponent['Date Checked'].replace(/\s.*/g, '') }}}

Mike Deck
Software Developer
Autodesk, Inc.