LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help issues with arrays

Solved!
Go to solution

@altenbach wrote:

It is NOT appropriate to plagiarize code that is not yours without giving links to the earlier discussion.

 

I am not even sure why you started a new thread thus I merged the two discussions into one.


Posting on multiple sites without attribution or links is not nice either

 

https://lavag.org/topic/23144-help-with-array-pls/#comment-150547

0 Kudos
Message 21 of 22
(220 Views)

@altenbach wrote:

@JÞB wrote:
I'm still not sure what the blue wires do.  If OR Array is true stop the inner loop wire OR array out of the inner loop on a last value tunnel to the conditional tunnel boolean input.

 

EDIT: perhaps the requirements have changed a bit?......

 


The requirements were not entirely clear but the current code finds only rows that contain all of the listed ingredients, so if the array contains 2 ingredients, the loop stops after two have been found. If fewer were found when the loop stops, the entry is filtered out by the conditional tunnel. There are many other ways to do all this of course.


That makes sense.  I didn't jump in on the original thread but had to quickly retype my response after my post 404'd due to the thread merge.

 

5 recipes of up to 10 ingredients each.  Search for 0, 1 or 2 target ingredients and return all unique recipes containing 1 or more ingredients.   

0 ingredients is moot as the inner loop is a 0 iteration loop (ensure default outputs A FALSE(

2 ingredients is easy enough

1 search ingredient can be tricky since the user might type into element 1 leaving element 0 default.  To be safe the default element value should be a sentinel not empty string and probably not whitespace.  SUGGESTED: use default of "Po 210" as hopefully the recipes are non lethal 😮


"Should be" isn't "Is" -Jay
0 Kudos
Message 22 of 22
(213 Views)