Return Text from IF

General discussion about Go Calc

Return Text from IF

Postby jeff » Mon Sep 15, 2008 3:11 am

Can anyone give me a tip on how to return a text value from an IF function. Something like the following:

IF(Condition, Equation if True, "text if false")

The if function in Go Figure doesn't like to return a text value. Any ideas on how to implement CHOOSE with the IF to get my text result? For now, I'm just using an obviously out of range value for false.

Also, I'd really like to see the ability to share/backup equations.

Thanks,

Jeff

BTW - I just upgraded from Lite to Full version and the improvements are well worth the price.
jeff
 
Posts: 2
Joined: Fri Jul 25, 2008 9:15 pm

Re: Return Text from IF

Postby mgkennard » Mon Sep 15, 2008 6:39 pm

At the moment Go Figure only supports number data types. In the long term more data types such as text, lists, complex numbers should be supported.

As a workaround you can use something like this,

?age:<18=Child,>=18=Adult

You may have to combine this with the IF function - i.e. one result which uses the IF and then another result which outputs the text. A little messy at the moment unfortunately!

Matthew
Apps On The Move
mgkennard
Site Admin
 
Posts: 355
Joined: Mon Jul 21, 2008 2:40 pm

Re: Return Text from IF

Postby mpantoja » Wed Mar 10, 2010 11:28 pm

|| ?age:<18=Child,>=18=Adult

Oh man! That's the missing feature I was looking for. I read everything I could find on the site to get something like this to work. Now I wonder what other glorious syntax is hiding. Please, if you can think of anything else like this that isn't in the documentation... share! I have so many calculators to make, I want to use any feature I can get my hands on.

Thanks for a fantastic app!
mpantoja
 
Posts: 3
Joined: Wed Mar 10, 2010 11:03 pm

Re: Return Text from IF

Postby mgkennard » Fri Mar 12, 2010 6:42 pm

No other syntax hiding! The ? is a little ugly. Ideally a proper type system would be implemented so that in addition to numbers you could have Text, Date, proper Boolean, etc types.
mgkennard
Site Admin
 
Posts: 355
Joined: Mon Jul 21, 2008 2:40 pm


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest