Is length function acting buggy for anyone else? | Community
Skip to main content
Level 4
January 11, 2024
Solved

Is length function acting buggy for anyone else?

  • January 11, 2024
  • 1 reply
  • 758 views

There are 2 functions named length according to documentation: length for Arrays which counts items in array, and length for Strings which counts characters. 

 

In this video I am setting a variable where, if the length of a string is longer than x it will return one value and if not longer, then it will assign a different value to the variable. 

 

You'll notice that right before I save it and mouse over the length function it shows the guidance for String length. But after I save the module, mousing over shows the guidance for Array length.

 

I'm not sure if Fusion is actually swapping out the String function behind the scenes with the Array function of the same name or it is just mis-printing what appears in the mouseover text. 

 

However, after I run the module, regardless of the length of the value that I input, it is always outputting the variable as though the If condition were true. Can anyone...

a. duplicate what I see with the mouseover text?  and / or

b. spot where I might have built this module wrong (provided the length function is NOT buggy)? 

 

 

For a bigger view of the video if you can't see it well enough inline, you can watch it here: https://youtu.be/DiHyF2NIoDo

 

Thank you. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by _Manish_Singh

Could you try
if(length(Other Biomarker String)>3;Greater;Less Than)

instead of
if(length(Other Biomarker String>3);Greater;Less Than)

And yes, after I save, it shows array function suggestion instead of string

1 reply

_Manish_Singh
_Manish_SinghAccepted solution
Level 9
January 11, 2024

Could you try
if(length(Other Biomarker String)>3;Greater;Less Than)

instead of
if(length(Other Biomarker String>3);Greater;Less Than)

And yes, after I save, it shows array function suggestion instead of string

Mylah_DAuthor
Level 4
January 11, 2024

Excellent! Yes, your suggestion did the trick.

 

https://youtu.be/EBWqn7cD6FE

 

I knew someone would spot something I missed. You guys rock. So, the only thing I guess that is a teeny bit buggy is the array function mouseover. I'll report it in a ticket just so they can track it that way. 

 

Many thanks, Manish.