Hi! Im trying to make an inventory
The idea was to store the stuff in a datamap and display only the names of the datamap but using for each name a link-reveal that displays the values of the names
To do that I was trying to make a live macro that incremenets an index variable and then shows the link reveal for the object of the index, but the live macro overwrites it when the index is changed!
So what Is that maybe somehow i can concatenate code on each loop of the live so I can display the dataset as I want and its not overwrited
Thanks!
Comments
One way to do what you want is to use a named hook to indicate where you would like the output of you dynamic code to be placed, then you can use either the (replace: ) macro or the (append: ) macro to target that named hook.
1. The basis of the logic part of your code would look something like the following note: I added indentation and extra line-breaks to the above example, most of it can be removed except for the first line-break within each (replace:) and (append:) macro's associated hook because those are needed to format the list so that each item appears on its own line.
2. The Dynamic Code to output the link-reveal.
You can use the (print:) macro to convert text contained within a String value into macro code. You will need to use the (text:) macro to convert the value stored in the $inventory database into a String value so that it can be concatenated to the String value being passed to the (print:) macro.