Test operations to monitor a string variable

I am working on creating my own recipes (via the IFTTT website) and I was wondering how to use the test operations on a string. They seem to be desiged to work well with numbers but not so much on strings.
Is there a way to do a IF <variable> CONTAINS <sub string>

Thanks
Markus

Wouldn’t it be easier to have your Spark check for the required word, and then have it fire an event if it finds it? This would eliminate having to check for a string. It should also be a bit more responsive than the variables.

Just an idea though. If you could describe your use case, we might be offer to viable alternatives/solutions.

@Moors7, Actually no. In my case I am using a cloud variable for error messages. the string can contain a combination of errors. If I want to trigger something on a combination then I need to create an exponentially growing event supply.
Take the Twitter module for example, it has a search string. I just think the choices

Greater
Less
Equals
Greater Or Equal
Less or equal

are useless for strings. How can I at least test if a string is empty?

The great power of IFTTT is that is decouples internal logic from external interpretation and leaving it up to the user what to do.

Hmmm. I think this is more of a IFTTT implementation but i’m sure it can be worked out. @dave should know best if this can be requested.

Seems like the current design is to handle number variables

Hey all,

Ooh, great idea! Although you can use greater/less than for strings, we could certainly add a few helpful string operations… how about we add…

1.) Is Empty
2.) Contains

Thoughts?

Thanks,
David

3 Likes

@Dave, is it possible to have type sensitive options - meaning showing different choices for numbers and strings?

wishlist:

is Empty
is not empty
is not equal
contains 

The ‘contains’ operation would be great to feature ‘AND’ and ‘OR’ string operators

Heya @MarkusL,

Ooh good question, maybe! I know IFTTT lets you provide a set of options programmatically, but I don’t think they tell you what else has been picked in the form, so I don’t think you can do conditional logic like that in the form itself.

The other part that is tricky for adding options is I can’t change them directly myself now that the channel is published. So I need to wait on them to add them behind the scenes I suspect. But I think the string comparison options are a great idea, I’ll try to get them in. :slight_smile:

Thanks,
David