Reserved Words

Reserved words are used to add data to a filter based on when, and by whom, the filter is run.

Example: A user wants a filter of all the work that was completed in the last week. He creates a filter that says:

SELECT * FROM WKORDER WHERE WKORDER.WO_END_DT >= '6/18/2012' AND WKORDER.WO_END_DT <= '6/22/2012'

However, this query statement would be out of date the next week, requiring the user to adjust the dates.

So, the user rewrites the statement using the %PREVIOUSWEEK% reserved word:

SELECT * FROM WKORDER WHERE WKORDER.WO_END_DT = %PREVIOUSWEEK%

The new filter displays all work orders with an end date that falls within the seven days previous to it being run.

Note: When using reserved words, enter them in all uppercase letters and enclose them in percent symbols (%)

 

Available Reserved Words

The following is a list of all the reserved words available in Lucity Web.

 

'%LOGGEDINUSERID%' - Returns the currently logged in user's Login ID.

Example

 

'%LOGGEDINEMPCODE%' - Returns the currently logged in user's Employee ID, which is found in the EM_EMPL_CD field in the WKUEMP table. When used in a filter, the system replaces the reserved word with the Work Employee Code of the currently logged in user.

Requirements - An agency must own the Work module to use this string. Also, the logged in employee must have his or her Login ID associated with an Employee record in the Work Flow Setup > Employees module.

Example

 

'%FISCALYEAR%' - Returns the Current Fiscal Year from the Desktop application's Planning and Budgeting, Fiscal Year module.

Requirements - An agency must own the Work module to use this string.

Example

 

'%CURRENTYEAR%' - Inserts the current calendar year.

Example

 

'%CURRENTQUARTER%' - Inserts the current quarter.

Example

 

'%CURRENTMONTH%' - Inserts the current month.

Example

 

'%CURRENTWEEK%' - Looks at the current date and inserts the dates for the Sundays before and after the current date.

Example

 

'%CURRENTWEEK1%' - Looks at the current date and inserts the dates for the Sundays before and after the current date. (Results are identical to those using the previous reserve word.)

Example

 

'%CURRENTWEEK2%' - Looks at the current date and inserts the dates for the Monday in the same calendar week and the next Monday.

Example

 

'%CURRENTWEEK3%' - Looks at the current date and inserts the dates for the Tuesday in the same calendar week and the next Tuesday.

Example

 

'%CURRENTWEEK4%' - Looks at the current date and inserts the dates for the Wednesday in the same calendar week and the next Wednesday.

Example

 

'%CURRENTWEEK5%' - Looks at the current date and inserts the dates for the Thursday in the same calendar week and the next Thursday.

Example

 

'%CURRENTWEEK6%' - Looks at the current date and inserts the dates for the Friday in the same calendar week and the next Friday.

Example

 

'%CURRENTWEEK7%' - Looks at the current date and inserts the dates for the Saturday in the same calendar week and the next Saturday.

Example

 

'%CURRENTDAY%' - Inserts the current 24-hour period. This is a range from 12:00 AM of the current day to 12:00 AM of the next day.

Example

 

'%PREVIOUSYEAR%' - Looks at the current date and inserts January 1 of the previous year to January 1 of the current year.

Example

 

'%PREVIOUSMONTH%' - Looks at the current date and inserts the first date of the previous month and the first date of the current month.

Example

 

'%PREVIOUSWEEK%' - Looks at the current date and inserts the dates of the previous week, Sunday to Sunday.

Example

 

'%PREVIOUSDAY%' - Inserts the day previous to the current day.

Example

 

'%FIRSTHALFOFTHEMONTH%' - Inserts the first half of the month (days 1-15).

Example

 

'%SECONDHALFOFTHEMONTH%' - Inserts the second half of the month (days 16-31).

Example

 

'%ONEWEEKAHEAD%' - Inserts the current day, plus seven future days.

Example

 

'%TWOWEEKSAHEAD%' - Inserts the plus 14 future days.

Example

 

'%ONEWEEKAHEADANDBEFORE%' - Inserts code to encompass all previous time, plus one week in the future. For example, this string could be used to query for all existing open Work Orders, as well as those that are open/due in the next week.

Example

 

'%TWOWEEKSAHEADANDBEFORE%' - Inserts code to encompass all previous time, plus two weeks in the future.

Example

 

'%LAST(X,Y)%' - Inserts a range of dates where the Last Date is calculated as the Current Date - X days and the First Date is calculated as the Last Date - Y days.

Example

 

'%NEXT(X,Y)%' - Inserts a range of dates where the First Date is calculated as the Current Date + X days and the Last Date is calculated as the Current Date + Y days.

Example

 

'%TODAY%' - Inserts today's date.

Example