Sometimes it is needed to print current date on the Item Label (for example when food is sold). This solution is applicable to Basic PDF Layout.
Solution
- Create Item Field
- Navigate to Customization > Lists, records, & Fields > Item Fields > New
- Label: Enter Label
Example: Current Date - ID:Enter ID
Example: _current_date - Field Type:Select Free-Form Text
- Store Value:Remove Checkmark
- Show in List:Enter Checkmark
- Click Applies To
- Relevant Item Types:Enter Checkmark
- Click Display
- Subtab: Select Main
- Display Type:Select Normal
- Click Validation & Defaulting
- Default Value:Enter to_char(current_date,’mm/dd/yyyy’)
- Formula: Enter Checkmark
- Click Save
- Add Item Field to Basic PDF Layout
- Navigate to Customization > Forms > Transactions Form PDF Layouts
- Standard Item Label Layout:Click Customize
- Click Add Custom Element
- Element Name:Enter Date
- Show Label:Enter Checkmark if the element should be printed on label
- Element text area: Enter {‌custitem_current_date}
Note1: Or ID given in step 1.3.
Note2: You can also find the field in the list of fields on the left side. - Click OK
- Adjust the position of the element by drag and drop feature
- Layout Is Preferred: Enter Checkmark
- Click Save