Logic Machine Forum
tag value of ocbject - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: tag value of ocbject (/showthread.php?tid=3137)



tag value of ocbject - Frank68 - 01.02.2021

Hello

i should retrieve the object tag value with the following code

Code:
------- retry TAGS for mailing dest
tbl = grp.gettags(name)

strTAGS = table.concat(tbl, ', ')


If I have more tags how can I retrieve the value of the single tag?


BR


RE: tag value of ocbject - admin - 01.02.2021

First tag will be tbl[1], second: tbl[2] and so on. But the table can be empty as well. Explain what are you try to do? Find if an object has a certain tag?


RE: tag value of ocbject - Frank68 - 01.02.2021

(01.02.2021, 09:31)admin Wrote: First tag will be tbl[1], second: tbl[2] and so on. But the table can be empty as well. Explain what are you try to do? Find if an object has a certain tag?

yes I am using the tags for various functions, in case of values, if I have more values the first value is used for or / and script, the second to send mail with differentiated address.

is it possible to see the length of the array?

thank's


RE: tag value of ocbject - admin - 01.02.2021

Array-like table length:
Code:
len = #tbl



RE: tag value of ocbject - Frank68 - 01.02.2021

(01.02.2021, 10:22)admin Wrote: Array-like table length:
Code:
len = #tbl

thank you very much