For example, if you change the default > template value to PRICE, then you must also change the value of > to PRICE. The value of the > option must match the > template value. To avoid unpredictable results in searches, do not use the matchseg1 option with the matchstr option.Ī customizable string that replaces the > template value with the segment of the field name that matches the second wildcard in each field in the list. For example, if you change the default > template value to PHONE, then you must also change the value of matchseg1 to PHONE. The value of the matchseg1 option must match the > template value. To avoid unpredictable results in searches, do not use the matchstr option with any matchseg* options.Ī customizable string that replaces the > template value with the segment of the field name that matches the first wildcard in each field in the list. For example, if you change the default > template value to ID, then you must also change the value of matchstr to ID. The value of the matchstr option must match the > template value. For example, if you change the default > template value to MYFIELD, then you must also change the value of fieldstr option to MYFIELD.Ī customizable string that replaces the > template value with the segment of the field name that matches the wildcard(s) in each field in the list. The value of the fieldstr option must match the > template value. OptionĪ customizable string that replaces the > template value with the name that you specify. These options are available only with the multifield mode. Use the following options to iterate over a field or list of fields using the multifield mode. Mode options The mode options depend on the mode you use. Iterates over a single supplied JSON array. Iterates over a single supplied multivalue field. This is the default if the mode is not specified. Iterates over a single supplied field name or a list of multiple field names, which can include wildcard characters. You can specify one of the following modes for the foreach command: Argument If a mode is not specified, the foreach command defaults to the mode for multiple fields, which is the multifield mode. Optional arguments mode Syntax: mode= Description: Tells the foreach command to iterate over multiple fields, a multivalue field, or a JSON array. Matches each element in a multivalue field or JSON array. The part of the field name that matches the third wildcard. The part of the field name that matches the second wildcard. The part of the field name that matches the first wildcard. The part of the field name that matches the wildcard values in the wildcard field. For each field that is matched, the templated subsearch replaces values as follows: Option subsearch Syntax: Description: A subsearch that includes a template for replacing the values of the specified fields, which depend on whether you are using multifield mode, multivalue mode, or json_array mode. field Syntax: Description: A field name that is used when iterating over elements in a multivalue field or JSON array, using the multivalue mode or json_array mode in a search. You can use this argument only with the multifield mode. ![]() ![]() You can also specify a list of wildcard fields, such as hostA* hostB* hostC*. For example, if you want to specify all fields that start with "value", you can use a wildcard field such as value*. You can use the asterisk ( * ) as a wildcard to specify a list of fields with similar names. Description: A space-delimited wildcard field name or list of wildcard field names that is used to iterate over one or more fields in a search. A single field representing a JSON arrayįoreach mode=(multifield | multivalue | json_array) | Required arguments wildcard-field-list Syntax.Each value in a single multivalue field.Use this command to run a subsearch that includes a template to iterate over the following elements:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |