Output required for Set Value action to work

Wappler Version : 3.4.1
Operating System : php

Expected behavior

The use of a Set Value action, should not be impeded if the output option is not ticked.

Actual behavior

An error is thrown when trying to reference that value downstream.

How to reproduce

Screen Shot 2020-10-26 at 2.14.17 PM

If the output option is not ticked on the Set Value: idvalue, then the following error is thrown when hitting the final_list Set Value action:

{
  "code": 0,
  "file": "/home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/formatters/collections.php",
  "line": 127,
  "message": "Undefined index: idvalue",
  "trace": "#0 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/formatters/collections.php(127): exception_error_handler(8, 'Undefined index...', '/home/tos/domai...', 127, Array)\n#1 [internal function]: lib\\core\\formatter_groupBy(Array, 'idvalue')\n#2 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(410): call_user_func_array('\\\\lib\\\\core\\\\forma...', Array)\n#3 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(364): lib\\core\\Parser->objectMember(Object(Closure))\n#4 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(306): lib\\core\\Parser->primary()\n#5 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(283): lib\\core\\Parser->group()\n#6 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(263): lib\\core\\Parser->unary()\n#7 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(253): lib\\core\\Parser->multiplicative()\n#8 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(243): lib\\core\\Parser->addictive()\n#9 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(233): lib\\core\\Parser->bitwiseShift()\n#10 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(223): lib\\core\\Parser->relational()\n#11 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(213): lib\\core\\Parser->equality()\n#12 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(203): lib\\core\\Parser->bitwiseAnd()\n#13 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(193): lib\\core\\Parser->bitwiseXor()\n#14 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(183): lib\\core\\Parser->bitwiseOr()\n#15 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(171): lib\\core\\Parser->logicalAnd()\n#16 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(155): lib\\core\\Parser->logicalOr()\n#17 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(151): lib\\core\\Parser->conditional()\n#18 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/core/Parser.php(96): lib\\core\\Parser->expression()\n#19 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/App.php(222): lib\\core\\Parser->parse('tripbit_ids.gro...', NULL)\n#20 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/App.php(207): lib\\App->parseObject('{{tripbit_ids.g...', NULL)\n#21 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/modules/core.php(99): lib\\App->parseObject(Object(stdClass))\n#22 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/App.php(174): modules\\core->setvalue(Object(stdClass), 'final_list')\n#23 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/App.php(138): lib\\App->execSteps(Object(stdClass))\n#24 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/App.php(108): lib\\App->execSteps(Array)\n#25 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnectLib/lib/App.php(73): lib\\App->exec(Object(stdClass))\n#26 /home/tos/domains/wappler.uniqueideas.com/public_html/dmxConnect/api/apijson.php(8): lib\\App->define(Object(stdClass))\n#27 {main}"
}

Hi,

Are you seeing idvalue in the picker UI when output is off?

SetValue works fine even when output is off. It can be used in other steps. The challenge here is that it is inside a repeat. Which is why you are facing the issue I think.

As the set value is inside a repeat it returns an array containing all the values set within the array when accessed outside the repeat. The error is you are not passing an array index when using the value

Thanks Sid and Brian…but the simple fact remains: if it works with output on (it does), then it should work with output off (it doesn’t).

That’s actually not how its supposed to work. Because its dynamic, a repeat can have anything in its output.

There can be numerous steps inside a repeat, which have no role in output, so we keep output off there.

Where you are using the repeat’s final output, you need to make sure that the property actually part of it.

Like I asked, if with output off, you are seeing the set value guy in action picker outside repeat, then that could be a bug.

So from my understanding, the exception you are seeing is not a bug. But a correct error.