[APP][Pro] Better Logic Library - For Users

Yes, you can pick any textfield as status indicator.

But no, unfortunately i cannot control colors of text.

As Arie already mentioned, different colors are not possible, but it’s possible to use Emojis: :white_check_mark: / :x: / :warning:

1 Like

I already do :red_square::black_small_square::orange_square:

1 Like

Arie, I already get stuck at the first bullet…

How to create a BLL function?
Do I have to place the code as text into the card?

Thanks
Fred

No.

Goto the BLL app settings :wink:

1 Like

OK. I see Functions > Add function over there. Is that what you mean?

I like the high degree of configurability of this app! You may expect some questions when I start to discover the functionality :wink:

1 Like

Yes! :grinning:

Edit: i have updated the post you referenced.

1 Like

I see quite some ways to control the datetime format.

For my project I want to add the time of receipt of an MQTT message to my data. I now do that in a human readable format, but I also want to do it as “epoch” / (micro)seconds since 1/1/70. Does BLL offer a way to do that?

BTW: now the current datetime is automatically generated by the Google Sheets card that I use for exporting my data. I will need to get the current datetime in a different way before I do the conversion to epoch.

EDIT: I found this discussion, this will give me the thing I look for when I let it return unixTimestamp

In BLL, just use now.

In which card?

Just try a few?

What do you want?
The time in a variable or tag?

What do you want to do with the timestamp or tick?

If you want a tag for instance, use the Execute BLL expression as Tag and fill it with now.

1 Like

I want it as variable. Or better: as something that I can export to a Google Sheets workbook. I succeeded now to do this with a BLL card that can execute code.

1 Like

Hiyas @Arie_J_Godschalk and others,

can you tell me if there is a BLL string operator for “contains”?
or possibly even better, is there a repository with all functions and syntax?

Yes, check the app settings. Goto the link for Lodash. There you will find an operator for contains.
Altho i think "blabla".contains("b") might already work or "blabla".indexOf("b")>-1

Heeey, wonderful, thank you @Arie_J_Godschalk.
I couldn’t find a contain command but that “indexOf” is working. Here is an example that checks if bot Pref2 and Pref3 are not in text1. For those that need one :slight_smile:
image
This is a BLL logic evaluation card, btw.

1 Like

Woah, wouldn’t have found that in the Lodash list. Look at this:


It’s listed as an array command (that is what I knew it for) - no mention of the string usage. Comparing string contents isn’t that something completely different than returning an array index?

@Philippe_Mucher
_.includes('abcd', 'bc'); // => true

2 Likes

Ow yeah! Did not see that one. Thank you, @Arie_J_Godschalk !!

1 Like