Forums

Switch values in the dropdown

serguei_kp 22 Apr, 2019
Hello, how to switch values in the Dropdown that is inside the repeater?
I'm trying to reproduce it in the way I do it with Radios group, but it does not give the same result.

My dropdown :

Name: Modelservices[{var:area_repeater8.key}][service_name]
Options:
={l:select_service_name}
loire={l:loire}
st_michel={l:st_michel}
normandie={l:normandie}
champagne={l:champagne}
font_versailles={l:font_versailles}
paris={l:paris}
provins_troyes={l:provins_troyes}

I'm trying to do it with a switch43 which is in the body of a Loop event but it switches only one value (option) of the dropdown, thus this one value is repeated in the email where I use this value.

My Loop event Name: loop_event16


My switch name: switch43

Data provider: {var:loop_event16.row.service_name}
Values setup:
loire:{l:loire}
st_michel:{l:st_michel}
normandie:{l:normandie}
champagne:{l:champagne}
font_versailles:{l:font_versailles}
paris:{l:paris}
provins_troyes:{l:provins_troyes}

Loop where I use a switch43 to print a table in the email:

Name: loop_all_fields
Data provider: {data:Modelservices}
Loop body:
{var:loop_all_fields.row.service_date}
{var:switch43}

But only one value from switch43 is repeated in all lines of the table, while I need to parse all values and print them one by one in each line.

Best regards.
healyhatman 22 Apr, 2019
{var:switch#} is set in your loop event, you can't use it in another loop to get a different value each time. Just set your loop event to Return As Var, and put a custom code at the end of the Loop Event (NOT set to return as var) with your loop text in it. Then use {var:loop_event#} in your email body.
This topic is locked and no more replies can be posted.