ATC: ITEMDUE item option
This command sets the Item Due date for a document Item.
- item is required. It specifies the Item that will have the due date. You can specify the Item in one of three ways:
- @ references the current Item in a FOREACH loop.
- Itemnumber is the exact Item number. If the Item does not exist, an error will occur.
- LIKE itemnumber-pattern indicates Items that match the pattern specified. Use * as a wildcard in your pattern. Note: LIKE can be used with an exact Item number to avoid an error when the Item is missing.
- option is required and can be any combination of the following. Options are applied in the order they are specified:
- n indicates the number of days to add or subtract to the current due date for the document. Use – (minus sign) to indicate number of days to subtract and use 0 (zero) to leave the due date as is. n can include decimals (e.g., 3.5 for 3 and a half days).
- DUE sets the Item due date based on the document due date.
- NOW sets the Item due date based on the current date.
- DAY nth indicates that the Item due date should be changed to the nth day of the month, advancing to the next month if needed. sfPMS figures out which month by first calculating the DUE n or NOW n date and then the DAY nth day.
- WEEKDAY indicates that if the resolved date (after all prior options are processed) falls on a Saturday or Sunday, the next Monday should be used.
- AT h indicates the exact hour (time) for the Item to be due and, if used, must be specified as the last option. h is expressed in the 24-clock and can include decimals; for example, AT 15.5 means 3:30 PM.
- [V2020+] FROM $variable sets the working date based on the value of a date variable.
ATC: ITEMDUE @ DUE -5
The above example means “set the due date for each Item to be 5 days before the document due date.”
ATC: ITEMDUE 0001 DAY 15 AT 17
The above example means “set the due date for Item 0001 to be the next 15th of the month at 5:00 PM.”
ATC: ITEMDUE 0001 DAY 15 WEEKDAY AT 17
The above example means “set the due date for Item 0001 to be the next 15th of the month at 5:00 PM, but if the 15th falls on a weekend, set the date to the following Monday.”
ATC: ITEMDUE LIKE 0* NOW 5 ATC: ITEMDUE LIKE 0001-001 NOW 1
The above example means “set the due date for all Items beginning with 0 to be 5 days from now then set the due date for Item 0001-001 to 1 day from now.”
ATC: SET $SourceDate = DocMasterDetail.SourceDate ATC: ITEMDUE FROM $SourceDate 1 WEEKDAY
The above example means “set the variable $SourceDate to the document’s Source date then set the Item’s Due date to one day past the Source date, advancing to Monday if that date falls on a Saturday or Sunday.”
Last updated: April 2, 2020 at 13:06 pm; green text = new