How to inject msg.payload.value as msg.id to function node?

[{"id":"9d466ec1.7ecb6","type":"function","z":"e50cdc2d.57d62","name":"inputsource msg.id or msg.name","func":"var lookups = flow.get(\"lookups\");\nif(msg.id){\n    msg.payload = lookups.id2name[msg.id]; \n    return msg;\n}\nif(msg.name){\n    msg.payload = lookups.name2id[msg.name]; \n    return msg;\n}\nif(msg.topic == \"id\"){\n    msg.payload = lookups.id2name[msg.payload];\n    return msg;\n}\nif(msg.topic == \"name\"){\n    msg.payload = lookups.name2id[msg.payload]; \n    return msg;\n}\nnode.warn(`msg doesnt contain id or name - or - topic is not set to id or msg`);","outputs":1,"noerr":0,"x":1346.25,"y":287.4999694824219,"wires":[["9cae58f6.361018","c4c7b797.644d58"]]},{"id":"81530402.0a7288","type":"change","z":"e50cdc2d.57d62","name":"","rules":[{"t":"set","p":"payload.value","pt":"msg","to":"id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1064.5,"y":287,"wires":[["9d466ec1.7ecb6","dbe55466.798bf8"]]},{"id":"ce64d661.b39858","type":"function","z":"e50cdc2d.57d62","name":"UPS INPUT SOURCE","func":"msg.payload = msg.payload [0].value\nreturn msg;","outputs":1,"noerr":0,"x":798.5,"y":289,"wires":[["81530402.0a7288"]]},{"id":"a1810a8c.ae14f8","type":"json","z":"e50cdc2d.57d62","name":"","property":"payload","action":"obj","pretty":false,"x":556.5,"y":290,"wires":[["ce64d661.b39858"]]},{"id":"5f255d09.fb30c4","type":"snmp walker","z":"e50cdc2d.57d62","host":"10.67.20.28","community":"public","version":"1","oids":"1.3.6.1.4.1.534.1.3.5","timeout":5,"name":"CMUPS","x":304.5,"y":289,"wires":[["a1810a8c.ae14f8"]]},{"id":"4127aefb.3957e","type":"inject","z":"e50cdc2d.57d62","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":177,"wires":[["89a692d6.e63dd","5f255d09.fb30c4","c70a4f52.183ea","f8e9890b.cba208"]]}]

You'll need to explain a lot more about what you are asking. Just pasting a flow doesn't help.

Excuse me. U r right.

I have a lookup table for meaning message. I was tested SAMPLE with inject node. It's ok.

But sample inject node have a TOPIC cell. It was set ID.

How do i change msg.payload to msg.id.

Thanks

Use a Change node

I was use change node on my flow. But i recieve "msg doesnt contain id or name - or - topic is not set to id or msg"

From your screen shot, you have the Change configured to set the property msg.payload.value with the value of msg.id. I think you mean to do the opposite - you want to set msg.id to the value of msg.payload.value.

(1) your msg does not contain msg.id - add some debugs displaying the complete msg object.
(2) you cannot change msg.payload property from a string/number to an object just by adding another label to it like msg.payload.value - msg.payload needs to be an object or you maybe able to use jsonata in the change node to make msg.payload and object.
(3) Are you looking to to use _msgid?

Yes i would use _msgid

It has not changed

I made an error, when I said:

'you can change msg.payload property from a string/number to an object just by adding another label to it like msg.payload.value'

I ment to write:

'you cannot change msg.payload property from a string/number to an object just by adding another label to it like msg.payload.value'

I have edited the original post to correct it.