I haven't had luck finding documentation on a couple of basic things. Examples provided on this site don't seem to address my specific use cases:
1) For a Switch() statement, where do I put the Else condition? I'd like the variable value to default to "n/a" if none of the cases are true in the below example:
2) For an If() statement, what's the syntax when testing equality with strings? In the below example, I don't use quotation marks because I didn't need them in the Switch() statement, but I notice that Fusion inserts "+" and a quotation marks when I preview the statement before running just the one module.
The intent is that the variable value should be set to "Flow" only if both conditions (assayMethod=Biomarker and assayPurpose=Flow Cytometry) are met, and yet when running the module, I always get a variable value of Flow, regardless of inputs:
>>> this is what it looks like in the "Run this module only" preview >>>
Could someone please advise on ways to make this work? Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
Hover over the function and look at the last example for the switch statement. You would put the N/A like: Biomarker;NA)
For your second question use a logical AND. if( assayPurpose = Biomarker AND assayPurpose = Flow Cytometry; Do stuff; Else). You don't need quotes when hardcoding strings but you do need to use the built in operators like the equals sign and the logical AND and OR instead of &&, ||.
Hover over the function and look at the last example for the switch statement. You would put the N/A like: Biomarker;NA)
For your second question use a logical AND. if( assayPurpose = Biomarker AND assayPurpose = Flow Cytometry; Do stuff; Else). You don't need quotes when hardcoding strings but you do need to use the built in operators like the equals sign and the logical AND and OR instead of &&, ||.
Thank you!
Views
Replies
Total Likes
One thing that I forgot to mention was that Fusion put the "+" symbol there because it was trying to concatenate the strings together. Glad I was able to help!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies