node-red-contrib-filemaker
Version:
Node-RED FileMaker nodes. These nodes use the FileMaker Data API to connect with a FileMaker database.
89 lines (83 loc) • 3.41 kB
HTML
<script type="text/javascript">
RED.nodes.registerType("dapi-record-id", {
category: "FileMaker",
defaults: {
name: { value: null, required: false },
data: { value: "payload.data", required: false },
dataType: { value: "msg" },
output: { value: "payload.data", required: true }
},
inputs: 1,
outputs: 1,
icon: "recordId.png",
color: "#39D1C0",
paletteLabel: "Record Ids",
label: function() {
return this.name || "Extract Record Ids";
},
oneditprepare: function() {
$("#node-input-data").typedInput({
default: "msg",
types: ["json", "msg", "flow", "global"],
typeField: $("#node-input-dataType")
});
$("#node-input-output").typedInput({
default: "msg",
types: ["msg"]
});
}
});
</script>
<script type="text/x-red" data-template-name="dapi-record-id">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag" aria-hidden="true"></i> <span>Name</span></label>
<input type="text" id="node-input-name" placeholder="Specific Node">
</div>
<hr>
<div class="form-row">
<label for="node-input-data"><i class="fa fa-align-left" aria-hidden="true"></i> <span>Data</span></label>
<input type="hidden" id="node-input-dataType">
<input type="text" id="node-input-data">
</div>
<hr>
<div class="form-row">
<label for="node-input-output"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i> <span>Output</span></label>
<input type="text" id="node-input-output">
</div>
</script>
<script type="text/x-red" data-help-name="dapi-record-id">
<p>
This node reduces the data found in <code>msg.payload.data</code> to only include the <code>recordId</code> property value.
</p>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Standard Output
<dl class="message-properties">
<dt>data<span class="property-type">Array | String</span>
<dd>A single record id string or an array of record id strings.</dd>
</dt>
</dl>
</li>
<li>Standard Error
<dl class="message-properties">
<dt>message<span class="property-type">String</span>
<dd>A node generated error message.</dd>
</dt>
</dl>
</li>
</ol>
<h3>Details</h3>
<p>
This node reduces the data found in <code>msg.payload.data</code> to only include the <code>recordId</code> property value.
<a target="_blank" href="https://github.com/Luidog/fms-api-client#record-id-utility-results"> See Example.</a><br/><br/>
This node can be configured to use either static or dynamic input parameters. Dynamic parameters may be read from either
the <code>msg</code> property or the <code>flow</code> and <code>global</code> contexts.<br/><br/> The default output of
this node is <code>msg.payload</code>. This node can also be configured to merge its output with any property on the <code>msg</code> object.
</p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/Luidog/fms-api-client#record-id-utility">Record Id Utility</a> - Base Client Utility Documentation</li>
<li><a href="https://github.com/Luidog/node-red-contrib-filemaker">Node-RED FileMaker</a> - The Node's Github Repository</li>
<li><a href="https://github.com/Luidog/fms-api-client">Data API Client</a> - Data API Client Github Repository</li>
</ul>
</script>