Count quantity of entries (data base)

Hello bubbles! Happy new year to all!

Is it possible to show a dynamic text with the quantity of entries in certain data base? I mean, I have 10 “positive” text, 5 “hazard” text, 20 “improvement” text… So, I need to show automatically the quantity of each texts by day. Is that possible!?

Thank you very much!!

create a number data type that has the hazard, improvement and positive text, set it to 0 and say every time there’s a positive text you would make it +1 to the positive text. do the same for the others and then all your text would have to say would be like “do a search for positive text’s value”

You could also use :count. So do a search for [insert search constraints] … :count.

Thanks for the feedback!
Sorry for that but I`m not a bubble expert… so, could you please show me how to do that?

Thank you very much!

Hi sure,

Add a text field to a page - Click on appearance - Insert Dynamic Content - Click Do a Search for then select the table you have the texts in then click count:

This will show in the text box the total number of text you have. You can now add a filter to Do a Search for - for the text type i.e. Hazard. So you can add a text box for each text type you want to do a count for.

I have shown below an example of below to count the number of users in the users database table

Hope that makes sense.

Simon
urban dash   Bubble Editor (1)

Thank you very much for the help!
How can I add the filter?
The data base has a lots of columns and I need to filter one column and three categories in separate.

Sorry for the question.

Here you go - you do it on the Do a Search for - you click ‘Add a new Constraint’ then you can select a field from the database i.e. Type then what you want it to = i.e. Hazzard

This will then give you a count of all texts = to Type Hazzard

See below

Simon

Thank you very much! Now my problem is to show only the “hazard” texts from today`s date.

There is a field called date in the data base I am using but when I create a new constraint considering “current date/time” it shows 0 as result. Actually I don`t want to consider time, only the date. What do I need to do to achieve this result?

Thanks!!

It really depends on what you mean by “today” - so in the same timezone or the last 24 hours etc.

But a simple way is to do …

image

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.