Is length function acting buggy for anyone else? | Adobe Higher Education
Skip to main content
Level 4
January 11, 2024
해결됨

Is length function acting buggy for anyone else?

  • January 11, 2024
  • 1 답변
  • 758 조회

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. 

이 주제는 답변이 닫혔습니다.
최고의 답변: _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 답변

_Manish_Singh
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_D작성자
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.