Buy Now
Sign in

Records count

devalex , June 02 2018, 18:19
D
devalex 5
June 02 2018, 18:19 #378106
Hello.
I need to display count of records at the bottom of а table. I do not understand how. Please help.
admin 29
June 08 2018, 05:02 #378190
 Answer
Hi devalex,
Just use a different "Read data" action with "Select type" set to "count" and call it under the list!
Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
D
devalex 5
June 08 2018, 05:58 #378194
thanks Max!
  what can duplicate "read data" I did not think
(i am sorry for my google translate)
amheng5 117
February 26 2019, 15:06 #384209
Sorry, not sure where to place your reference "call it under the list!"

My current settings to show my total records.

I have created under functions tab:

Read data --> count_records
select "Return the count of records matching the filtering conditions"

Under Views Tab --> created a Table called "total_count"
Data Provider: {var:count_records}
remaining blocks empty

Under Events Tab --
added "Total Records: {view:total_count}" to my index page before the {fn:read_records}

But no count appears. Where am I going wrong?
amheng5 117
February 26 2019, 22:37 #384218
Here's my solution and setup.
FUNCTIONS TAB
Read Data: count_records
Model - database table
where conditions: left blank

Data Settings: "Return the count of records matching the filtering conditions.

Remaining fields default settings.

VIEWS TAB:
create HTML
named: show_count
Content: <p>The total number of current records: {var:count_records}</p>

EVENTS TAB
index -->
add after model.table
{fn:count_records}
{view:show_count}

Hope this helps someone. I'm finding the answers provided by administrators are vague and really no good samples to follow for CC6 non programmers/users.
healyhatman 9
February 26 2019, 22:58 #384219
You could just use {var.count:read_data_name} instead of making another read data action. Although it will just count the number returned by the read data and not the number of records matching total (if you're using paging)
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
M
murilolule 17
July 23 2019, 19:02 #388378
Hello everyone!
I have the same problem and I'm not a good programmer, but Chronoforms has solved my problems a lot.

I have a table with various inscriptions for various courses. I would like to limit the number of places per course.

I know that by pressing the submit button I will have to read the number of records of the completed course. How do I do that???

Help me please!
healyhatman 9
July 23 2019, 23:39 #388380
In your submit even, use a read data action set to retire the count of records. Then use an If Conditions action and if the number of records is equal to the maximum number, display an error message and use an event load action to go back to load.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
M
murilolule 17
July 24 2019, 11:34 #388384
healyhatmanhealyhatman, thanks for the attention. I just have to thank you in advance!

Like I said, I'm not a good programmer and I'm still abusing myself with chronoforms6.

I don't know where to put the "If Conditions action". Do I put it in "Read Data" (found or not found?) Or outside "Read Data"?
The link of the form: https://www.educatu.com.br/index.php?option=com_chronoforms6&chronoform=replanejamento
The link of my form backup: https://drive.google.com/open?id=1PsswKztK1o8IC8XQOc7YEbhdC8eWt6CD
Thank you for helping me!!!
healyhatman 9
July 24 2019, 11:35 #388385
Put it after read data.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
M
murilolule 17
July 24 2019, 19:08 #388388
healyhatman, hello again.
Thank you for your patience with me.

I understand the process, but I don't know how to configure each component.

Should I put any "where conditions" in the "read data"?

How should I bring the records read in "read data" to if conditions "?
I don't know how to set this up!
&nbsp;
(I'm trying to attach images, but there is an error uploading)
M
murilolule 17
July 24 2019, 19:23 #388389
I forget to tell: i´m using Chronoforms 6.1
M
murilolule 17
July 24 2019, 19:29 #388390
https://drive.google.com/open?id=1KrsjADz4gnU8L2vsISQjDWW1MVvac0Zc
healyhatman 9
July 24 2019, 20:51 #388391
You should use where conditions if you need to get only some entries.
Bring the value to if conditions with {var:readdataname}
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
M
murilolule 17
July 28 2019, 16:34 #388453
Hello again.
I could not do the process.
In fact, I have to display a form with 20 courses. Each course has a different limit of places.

When the course appears, in the submit event, I need to count vacancies (I got it).
What I can't do is call the process of writing data into "if conditions" in this situation.
Can you give me an example, please?
How do I compare the course offered and the number of places and do the respective processes?
M
murilolule 17
July 29 2019, 15:42 #388472
I forgot to say tha i´m doind this in chronoforms.
healyhatman 9
July 29 2019, 22:24 #388479
You didn't forget, you said it a bunch of times.
Where are you getting the limits from? Have you stored the limits in the database somewhere?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
M
murilolule 17
July 30 2019, 11:07 #388512
I have this in a "vacancies" table, but it could also put in some component configuration.
What I do not understand how to do is how to bring this into the "if conditions" and query / compare with the number of workshops already counted in the "read data", and after that, generate a form action.
M
murilolule 17
July 30 2019, 11:09 #388513
look here: https://drive.google.com/open?id=1avhq8p4lLJHp2xyJigkjnQkuLzG9CoYd