Utils Nonce JSON Escape Sequence Timestamp Utils¶ Dynamic Values Utils How dynamic values work Use File dynamic values anywhere How to make your own dynamic value For general information about dynamic values and instructions on how to insert them in Paw see the introduction to dynamic values. Useful Dynamic Values. NonceNonce¶ The Nonce Dynamic Value allows you to generate unique random values. com.luckymarmot.NonceDynamicValue Argument: length: number: ``32``The length of the generated nonce string. 32 Argument: useUppercaseLetters: bool: ``true``Whether to include uppercase letters on the generated string. true Argument: useLowercaseLetters: bool: ``true``Whether to include lowercase letters on the generated string. true Argument: useDigits: bool: ``true``Whether to include digits on the generated string. true Argument: useHexDigits: bool: ``false``Whether to include hexadecimal digits on the generated string. false Argument: useASCIISymbols: bool: ``false``Whether to include ASCII symbols on the generated string. false function evaluate(context){ var dv = new DynamicValue('com.luckymarmot.NonceDynamicValue', { useUppercaseLetters: true, useHexDigits: true }); return dv.getEvaluatedString(); }; JSONJSON¶ The JSON Dynamic Value allows adds an inline JSON editor to any text field. com.luckymarmot.JSONDynamicValue Argument: json: string: NoneA valid JSON string. function evaluate(context){ var dv = new DynamicValue('com.luckymarmot.JSONDynamicValue', { json: '{"Node A": "Value A"}' }); return dv.getEvaluatedString(); }; Escape SequenceEscape Sequence¶ The Escape Sequence Dynamic Value allows adds escaped characters to any text field. com.luckymarmot.EscapeSequenceDynamicValue Argument: escapeSequence: DynamicString: NoneA valid JSON string. function evaluate(context){ var dv = new DynamicValue('com.luckymarmot.EscapeSequenceDynamicValue', { escapeSequence: 'Hello\\x20World!\\r\\nHow are you?\\t\\tFine, I hope!' }); return dv.getEvaluatedString(); }; TimestampTimestamp¶ The Timestamp Dynamic Value allows you to insert the current time in your requests. Format¶ Epoch Time¶ This is the standard UNIX epoch time (e.g. 1431461992), that is the number of seconds ellapsed since January 1st, 1970 in UTC time. RFC 1123 (Internet standard)¶ This is the standard format for HTTP requests (e.g. for the Date header). See RFC 1123. ISO 8601¶ Another international standard to represent time. See ISO 8601. You can choose to use T or a space as the separator between date and time, and to use Z to indicate UTC time instead of +0000. Custom¶ Set a custom date formatting in the C format. Example:: %Y-%m-%d %H:%M:%S Formatting reference:: %A is replaced by national representation of the full weekday name. %a is replaced by national representation of the abbreviated weekday name. %B is replaced by national representation of the full month name. %b is replaced by national representation of the abbreviated month name. %C is replaced by (year / 100) as decimal number; single digits are preceded by a zero. %c is replaced by national representation of time and date. %D is equivalent to ``%m/%d/%y``. %d is replaced by the day of the month as a decimal number (01-31). %E* %O* POSIX locale extensions. The sequences %Ec %EC %Ex %EX %Ey %EY %Od %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide alternate representations. Additionally %OB implemented to represent alternative months names (used standalone, without day mentioned). %e is replaced by the day of the month as a decimal number (1-31); single digits are preceded by a blank. %F is equivalent to ``%Y-%m-%d``. %G is replaced by a year as a decimal number with century. This year is the one that contains the greater part of the week (Monday as the first day of the week). %g is replaced by the same year as in ``%G``, but as a decimal number without century (00-99). %H is replaced by the hour (24-hour clock) as a decimal number (00-23). %h the same as %b. %I is replaced by the hour (12-hour clock) as a decimal number (01-12). %j is replaced by the day of the year as a decimal number (001-366). %k is replaced by the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank. %l is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank. %M is replaced by the minute as a decimal number (00-59). %m is replaced by the month as a decimal number (01-12). %n is replaced by a newline. %O* the same as %E*. %p is replaced by national representation of either "ante meridiem" (a.m.) or "post meridiem" (p.m.) as appropriate. %R is equivalent to ``%H:%M``. %r is equivalent to ``%I:%M:%S %p``. %S is replaced by the second as a decimal number (00-60). %s is replaced by the number of seconds since the Epoch, UTC (see mktime(3)). %T is equivalent to ``%H:%M:%S``. %t is replaced by a tab. %U is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (00-53). %u is replaced by the weekday (Monday as the first day of the week) as a decimal number (1-7). %V is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (01-53). If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1. %v is equivalent to ``%e-%b-%Y``. %W is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (00-53). %w is replaced by the weekday (Sunday as the first day of the week) as a decimal number (0-6). %X is replaced by national representation of the time. %x is replaced by national representation of the date. %Y is replaced by the year with century as a decimal number. %y is replaced by the year without century as a decimal number (00-99). %Z is replaced by the time zone name. %z is replaced by the time zone offset from UTC; a leading plus sign stands for east of UTC, a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter between them (common form for RFC 822 date headers). %+ is replaced by national representation of the date and time (the format is similar to that pro-duced produced duced by date(1)). %-* GNU libc extension. Do not do any padding when performing numerical outputs. %_* GNU libc extension. Explicitly specify space for padding. %0* GNU libc extension. Explicitly specify zero for padding. %% is replaced by ``%``. com.luckymarmot.TimestampDynamicValue Argument: format: number: ``2`` (RFC 1123)Timestamp format (0: Custom, 1: Epoch Time, 2: RFC 1123 (Internet standard), 3: ISO 8601). 2 (RFC 1123) Argument: customFormat: DynamicString: ``2`` (RFC 1123)Set a custom date formatting in the C format. Only applicable to Custom format. 2 (RFC 1123) Argument: now: bool: ``true``Whether the time should be set to the current one. If false, the date parameter must be set. true Argument: delta: number: ``0``Optional delta in seconds to either increment or decrement the current time. May be useful when need to set an expiring date some time in the future. 0 Argument: date: Date: NoneA Date object. Must be set if now parameter was set to false. Argument: isLocalTime: bool: ``false``Whether the time should be set to local time zone. If false, it is set to UTC/GMT time. Ignored for Epoch Time format. false Argument: useTSeparator: bool: ``true``Whether to use T as separator between date and time. If false, a space is used instead. Only applicable to ISO8601 format. true Argument: useZForUTC: bool: ``false``Whether to use Z to indicate UTC time. If false, +0000 is used instead. Only applicable to ISO8601 format. false function evaluate(context){ var dv1 = new DynamicValue('com.luckymarmot.TimestampDynamicValue', { now: true, format: 0, customFormat: 'Today is just another %A!' }); var dv2 = new DynamicValue('com.luckymarmot.TimestampDynamicValue', { now: false, format: 2, date: new Date(1977,5,28,19,00,01,300) }); return dv1.getEvaluatedString() + "\nI was born at " + dv2.getEvaluatedString(); };