The "usual way" to do this is if left blank then it can be set by something - like msg.tagID... in which case you would just test for that in the on input code... (with the property set by the user having priority)
The newer more flexible way is to maybe make it a typeInput TypedInput Widget : Node-RED - which can then be set to a string (str) or message property (msg) or other type as well - and gives more flexibility of the property that you would accept. For example the base64 node - node-red-nodes/70-base64.html at master · node-red/node-red-nodes · GitHub and Lines 40-43 and the .js file lines 7 and 12 etc...
Up to you
1 Like