RandomListItems

RandomListItems

Randomly samples from a given list provided by a subgenerator. Chooses between randomly between [min, max] number of element from the provided list. e.g. min:2 max:3 original list {a,b,c,d,e,f} then this generator may generates a new list: {e,a} or {b,f,d}

Attributes
Name Description Required Min Max Allowed Values
singleItemAsList Content type: Boolean
If the number of elements from the list is 1, don't forward as list with one entry but forward the item itself.
Default: true
no 0 1
  • true
  • false
  • 0
  • 1
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
listName Content type: String
Name of the generated list. List will be of type bankmark.pdgf.util.io.generator.collection.NamedList and has a getName() method which you can use in your custom output to get easy access to this specific list.
Default: <not set>
no 0 1
Nodes
Name Description Required Min Max Allowed Values
sameChoiceAs Content type: Empty
Requires a <field> and a <generatorByID> attribute (in same table) to pick the row number from. If specified this RandomListItems does not choose a random row, but it uses the same row as the referenced generator.
Default: <not set>
no 0 1
min Content type: Integer
Minimal number of elements to choose from list.
Default: 1
no 0 1
max Content type: Integer
Maximal number of elements to choose from list.
Default: 2147483647
no 0 1
gen Value Generator for this field yes 1 1
2.7-83fb0 | 2020-04-22