Jump to content

Using detail function inside a wrangle in a for each connected loop


dolexd

Recommended Posts

Hello,

I have a for each connected loop, and I created a meta import node. To access the node using the detail function in a wrangle I have to use the back ticks to get the value of the iteration otherwise it just shows 0 without the back ticks.

Can some please explain to me why we need to use the detail function in back ticks, for example `detail("../eachP/", "iteration", 1);` in a wrangle node for it to work?

Thanks,

This is with back ticks

image.thumb.png.97a934c5924e1fd3f31acc6eaa033e42.png

This is without back ticks

image.thumb.png.fc59b0eb5af135b413fa01bd497f4f14.png

 

Link to comment
Share on other sites

8 hours ago, dolexd said:

Can some please explain to me why we need to use the detail function in back ticks, for example `detail("../eachP/", "iteration", 1);` in a wrangle node for it to work?

you don't need backticks, with backticks you are inserting HScript expression into the code string, which will get resolver first and then the string is used as VEXpression, so it's similar to typing the number there
to use detail() VEX function with an operator path you have to specify the path with op: prefix, so in your case

i@loopN = detail("op:../eachP", "iteration");

however I'd suggest using Spare Inputs to reference geo from operator path instead

Link to comment
Share on other sites

Hi Tomas,

Thanks a lot for you explanation. I get it now.

Spare inputs does look easier. Thanks for the tip.

7 hours ago, anim said:

you don't need backticks, with backticks you are inserting HScript expression into the code string, which will get resolver first and then the string is used as VEXpression, so it's similar to typing the number there
to use detail() VEX function with an operator path you have to specify the path with op: prefix, so in your case


i@loopN = detail("op:../eachP", "iteration");

however I'd suggest using Spare Inputs to reference geo from operator path instead

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...