As titled. When using a read data action, with Select Type set to "index the results list by one or more fields values" how do you set which field you're indexing by?
Forums
How to use the option to "Index the results list by one or more fields values"
In the Fields to retrieve field put the names of all the fields you want to retrieve, including the ones you want as indexes.
In the Special fields field put the names of the fields that you want as index, like this:
The returned array has the following format:[pre][concatenation of the index values] => Array(
0 => Array([br] "My_model" => Array([br] "my_first_field" => a_value,[br] "my_2nd_field" => "anothe value"[br] )[br] )[br])[br][br]Example:[br]Array([br] 2 => Array([br] 0 => Array([br] "my_model" => Array([br] "id" => 2,[br] "name" => "John",[br] "surname" => "Doe"[br] )[br] )[br] )[br])[/pre]
[br]bye
maxx
In the Special fields field put the names of the fields that you want as index, like this:
my_field/indexIt doesn't work if you use the model name syntax My_model.my_field, in both fields.
The returned array has the following format:[pre][concatenation of the index values] => Array(
0 => Array([br] "My_model" => Array([br] "my_first_field" => a_value,[br] "my_2nd_field" => "anothe value"[br] )[br] )[br])[br][br]Example:[br]Array([br] 2 => Array([br] 0 => Array([br] "my_model" => Array([br] "id" => 2,[br] "name" => "John",[br] "surname" => "Doe"[br] )[br] )[br] )[br])[/pre]
[br]bye
maxx
This topic is locked and no more replies can be posted.