Is this possible? I finally have a use case for named output.
Page 1 / 1
The elusive named output! I’m curious about your use case - I’ve always wanted to use it for something.
You should be able to make the Output value available to a snippet by creating an Action Sequence with an Input for the Output value (confusing, I know…), and then running the snippet from that Action Sequence. Snippets run from an Action Sequence have the Action Sequence Inputs available to them in the arguments, so you can get the $Output value that way.
Here’s a quick example page since the set up is a little convoluted:
<skuid__page unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false">
<models>
<model id="UI" limit="20" query="true" createrowifnonefound="true" datasource="Ui-Only">
<fields>
<field displaytype="TEXT" length="255" id="testfield"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<skuid__buttonSet model="UI" uniqueid="sk-1kk0-11942">
<groups>
<skuid__buttonGroup uniqueId="sk-1kk0-11940">
<buttons>
<skuid__button label="Update row" uniqueId="sk-1kk0-11941">
<actions>
<action type="updateRow" fieldmodel="UI" affectedrows="context">
<updates>
<update valuesource="fieldvalue" field="testfield" enclosevalueinquotes="true" value="test"/>
</updates>
<outputs>
<output id="rows" type="rows" name="updated_row"/>
</outputs>
</action>
<action type="action-sequence" action-sequence-id="c1cfd4f4-8cc8-4a85-bb55-d2360d312f18">
<inputs>
<input name="output_value" value="{{$Output.updated_row}}"/>
</inputs>
</action>
</actions>
</skuid__button>
</buttons>
</skuid__buttonGroup>
</groups>
</skuid__buttonSet>
</components>
<resources>
<labels/>
<javascript>
<jsitem location="inlinesnippet" name="processOutput" cachelocation="false">const params = argumentsr0];
output = params.$Input.output_value;
console.log("Output: ", output);</jsitem>
</javascript>
<actionsequences>
<actionsequence id="c1cfd4f4-8cc8-4a85-bb55-d2360d312f18" type="reusable" label="Send output to snippet">
<description/>
<actions>
<action type="custom" snippet="processOutput"/>
</actions>
<inputs>
<input type="value" name="output_value"/>
</inputs>
</actionsequence>
</actionsequences>
</resources>
<background/>
<interactions/>
<surfaces/>
</skuid__page>
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.