Data Blaze with IF command

Hello everyone,
I could use your help with Data Blaze, I have a simple data base with customers data (name, email, country they're from etc.) and what I want to do is to create a snippet which would load the specific list of email depending on the category, in my case it's country.
For example I have 10 customers from Japan, and I want to load all their emails, but I also would like to choose the country to Brazil next time, without going to the dashboard and manually changing the condition each time.
I guess IF command should help, but I struggle with implementing it.

Could you help me if this is possible in Data Blaze

Hi @StarChronicles ,
Welcome to Text Blaze community.

There are multiple ways and implementation might depend on how your data is configured.
For the simple data implemented, this could be one way

I used DbSelect to get all the customers in the data.

Used unique(map(customers, (customer) -> customer.country)) to get all the unique countries.

Used {formmenu: values={=locations}; name=country} to display a field to display those countries so you can select.

filter(customers, customer -> customer.country = country) to filter customers with the selected country

I also have a different implementation using where clause. Please check the other snippet named "Customers in country"

Hi @VinodGubbala ,
Thanks, I was able to do it finally, I appreciate your help.

I do however another interesting question: Is it possible to create any kind of timer in Data blaze table? I am filling my data base with customers data, and later after some time I want to send a follow up message or a newsletter, therefore it would be very usefull if there was a timer that would be triggered based on the date of creating each row of my database
image
There is a formula "datetimeadd" but I think this is not very useful in this case because it doesn't allow to enter the "created on" as a first argument
image

Please let me know if there is any way to implement this task, thanks.
P.S The text blaze and data blaze is a very powerfull tool, I hope it will have even more features in the future

Can you please help me understand how you want to calculate the remaining time you want to generate.

There are multiple ways you could do this, and I am sure you can use Created on with datetimeadd . The syntax should look like datetimeadd(`Created on`, 4, "D").