Skip to content

For Each Loop array help #6162

Answered by EthanKC
EthanKC asked this question in Q&A
Apr 15, 2024 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

I was finally able to get this to work how I needed. You can see the logic below. What I ended up doing is, instead of creating an array within the script using const, I wrote the array to a variable connectorMap value of "lineArray"+x, where x is the OBX.1.1 value of the current OBX being looked at. I then ran into the issue where I couldn't use the .shift function to remove the first value in the array, so I had to scrap that. Instead, I set y = 0, then incremented that up by 1 each time so I was moving through each object in the array. I set it to stop when y = length of the array. There were a few other minor adjustments to the original logic, but what you see below is able to look at…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@EthanKC
Comment options

@EthanKC
Comment options

@pacmano1
Comment options

@pacmano1
Comment options

@EthanKC
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by EthanKC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants