addamroy 36 Posted May 5, 2012 Report Share Posted May 5, 2012 From the beginning, here's the goal. The program will take each entry in a list column and incorporate it into a little strip of PHP code. It loops so the same snippet of PHP code is created for each item in the table column, pretty straight forward. Here's what I have... a loop, runs according to number of table rows. Table is saved as a csv file. So basically the only problem is, and the above might be irrelevant, everytime I save a 'set' node containing the PHP code along with the variables I dragged in from the toolbox into their appropriate places in the code, the format of the set node contents change and basically remove the variables I dragged in. Here's what the code looks like, this is what's actually INSIDE the set node...if($comparison(#{#mcCurrentItem}, \"=\", \"true\")) \{ then \{ if($comparison(#{#mcCurrentItem}Quantity, \">\", 1)) \{ then \{ set(#weTotalWeight, $add(#weTotalWeight, $multiply(#{#mcCurrentItem}Quantity, {#mcCurrentWeight})), \"Global\") \} else \{ set(#weTotalWeight, $add(#weTotalWeight, {#mcCurrentWeight}), \"Global\") \} \} \} else \{ \} \} Notice all instances of #mcCurrentWeight, basically what's happening is I'm dragging the variables into the set node, which shows as the blue button thing from dragging the variable over, however when you save it the blue button thing goes away and is shown as text only exactly as shown above, needless to say it's not working. I don't know if it's a bug or what. Quote Link to post Share on other sites
addamroy 36 Posted May 5, 2012 Author Report Share Posted May 5, 2012 lol, funny story, the problem fixed itself... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.