nodered-grist/node-red-grist/update-records.html
2023-12-27 17:22:03 +01:00

57 lines
No EOL
1.7 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('grist-update-records', {
category: 'grist',
color: '#00bb00',
defaults: {
server: { value: "", type: "grist-server", required: true },
document: { value: "", type: "grist-document", required: true },
tableId: { value: "", required: true },
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-table",
label: function () {
return this.tableId ? `[Update] ${this.tableId}` : "Update records";
},
paletteLabel: "Update records",
oneditprepare: async function () {
}
});
</script>
<script type="text/html" data-template-name="grist-update-records">
<div class="form-row">
<label for="node-input-document"><i class="fa fa-file-text"></i> Document</label>
<input type="text" id="node-input-document" placeholder="Document">
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-server"></i> Server</label>
<input type="text" id="node-input-server" placeholder="Server">
</div>
<div class="form-row">
<label for="node-input-tableId"><i class="fa fa-table"></i> Table Name</label>
<input type="text" id="node-input-tableId" placeholder="Table Name">
</div>
</script>
<script type="text/html" data-help-name="grist-update-records">
<p>Updates records in a grist table.</p>
<h3>Inputs</h3>
<p>
<code>msg.payload</code> array of records (or a single record object) to add. Each record must contain the ID.
</p>
<h3>Outputs</h3>
<p>
No data. Called as soon as update was performed.
</p>
<h3>Attributes</h3>
<p>
</script>