I have replaced the table with a repeat so now have item.name and item.hours but cannot use {if:item.name="tony"}Test or {if:contains(item."tony")}Test
Provide a screenshot of all your code please so we can see what you are now working with. Or, copy/paste it. ![]()
Number of employees: {formmenu: 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; name=count}
{repeat: count; locals=employees}
Employee Name: {formtext: name=name} -- Hours worked: {formtext: name=hours; default=5}
{endrepeat}
Total hours worked: {=sum(map(employees, employee -> employee.hours))}
{repeat: for item in employees}
{=item} {=item.name} {=item.hours}
{endrepeat}
Format your if statement like this:
{if: contains(employees,"tony")}Test{endif}
Thanks Brad, that works. Could I take it a step further and make "tony" a variable - something like
{formtext: name=x}{if: contains(employees,("x"))}Test{endif}