Changes

Jump to: navigation, search

Selecting an eventid from a list of records

2,293 bytes added, 18:21, 20 October 2017
no edit summary
==Breakdown of List Syntax==
The variable above uses SmartSimple's [[List Syntax]]. The following is a breakdown of the different components of the syntax used, working from the inside out. {| border="1"|'''Syntax'''|'''Description'''|-|[[Image:VariableExampleStoreDisplay.png|link=|300px]]|* This is an example of the use of [[Stored value|stored values/display values]].* The value on the right of the equals sign, ''Payment on $Scheduled Payment Date$ of $Payment Amount$'', is the option that will be displayed on the dropdown list. The words between dollar signs (''$'') are variable names referring to the two fields, ''Scheduled Payment Date'' and ''Payment Amount''.* The value on the left, ''~eventid~'' is a variable that will return the [[Event id|unique ID]] of the selected record and that is what will be saved to the database.|-|[[Image:VariableExampleObjectandCriteria.png|link=|300px]]|* ''?object=activity'' tells the system that the list to be returned will be a list of {{l2}} records. See [[List Syntax]] for the list of ''objectname''s that can be substituted for ''activity''.* ''criteria=typename='Payment''' tells the system that it should only return the {{l2}} records that are of the [[type]] ''Payment''.* ''statusname='Scheduled''' tells the system that it should also only return the records that are in the ''Scheduled'' status.|-|[[Image:VariableExampleBracketHash.png|link=|300px]]|* The ''[#...#]'' tags tell the system that it should process a list of objects.* Everything between the ''[#...#]'' tags will be repeated as many times as there are records that meet the criteria specified above.|-|[[Image:VariableExampleParent.png|link=|300px]]|* The ''@parent...@'' syntax tells the system that it should look at the ''parent record'' for the list of records to be returned.|-|[[Image:VariableExample-PleaseSelect.png|link=|300px]]|*For [[Custom Field Type: Select One – Combo Box|combo boxes]], the values that are displayed are separated by semicolons. *The ''--Please Select--;'' will be the first value, followed by what is returned by ''@parent.[#...#]@''. *Given that there is a semicolon contained within the list brackets (''[#...#]''), each value from the returned list will be followed by a semicolon as follows:<br />''--Select One--;Payment 1;Payment 2;...;Payment N;''|}
Now that we have a stored list of ''eventid''s, we can refer to this field's [[stored value]] to perform operations on the selected records. For example, [[Workflow Task Type: Trigger Workflow|workflows can be triggered against these records]].
Additional examples of the objects and criteria that can be selected are available on the [[List Syntax]] page.
 
[[Category:JavaScript]]
Smartstaff, administrator
686
edits

Navigation menu