Why do you right click the query?
Sorry I really canāt understand what are you doing. The tutorial I sent you shows exactly the logic of showing or hiding content depending on a dynamic value.
You could view the source code of the page I linked to, and copy the row with id: results_summary. This includes the code you want, and also includes various examples of hiding/showing content.
You would need to do a couple of find/replaces to match your data source and query, but after that it should work. Then, by selecting the various elements, you can see how you could have selected those options using the UI. Eg if you click on the binding for total records, you will see:
In some cases (like this one), I prefer to edit the code directly, but you can do it however you want; either way it will appear like this in the UI (with some exceptions, which donāt apply here).
I tried what you had copied, and it seems to work. Interestingly - and this might be a clue as to the problem - you left out the first part of my code, which hides the bracketed part if limit >= total. If you search for one record (eg search for a stock number), you will see this (this is your version* below my version):
I think this is because 1 mod 0 = NaN (not a number); the offset will be 0 in this case. Itās a sort of error which I hadnāt noticed as I wasnāt displaying it in this case (though I donāt know if it matters). However, it doesnāt explain why youāre seeing it where the offset is not 0.
*Iām not sure if this is exactly your version - it may that you just didnāt paste all of the code.
Then can someone provide the steps to do that - something this simple should not take 3 days to accomplish. I would appreciate the actual code that will accomplish this instead for just directing me to another instructional page because obviously I donāt understand what needs to be done.
I* need it to show the number being viewed on the page i.e. 1-25 of 3,420. Right now I can get it to show the right number except on the last page where its shows like this 3401 - NaN of 3420 Total Records. I want it to show like this instead.
3401 - 3420 of 3420 Total Records
why - because my clients like it that way and Iām trying to change the page coding from kollections based to Wappler keeping what was displayed the same over the last 13 years.
Ok Mike,
Hereās the code you need, but try not to always copy paste code to achieve what you need in Wappler. I wanted to avoid providing the code, so that you can do it yourself. This way you will never understand how to use it, and whatās the logic behind what you are doing.
Records {{paging.data.query1.offset+1}} - {{paging.data.query1.page.current == paging.data.query1.page.total ? (paging.data.query1.total) : (paging.data.query1.offset+paging.data.query1.limit)}}
Please, in the future follow the tutorials, so you can understand how the things work and not blindly copy/paste code around your pages.
Believe it or not showing the code is more helpful than spending 5-7 days trying to understand this and getting frustrated to the point of giving up entirely. Which has happened on many occasions over the last 6-7 years.
Anyways thank you for this I added some code to complete it and although your code helps itsās not doing exactly right on the last page
Records {{paging.data.query1.offset+1}} - {{paging.data.query1.page.current == paging.data.query1.page.total ? (paging.data.query1.total) : (paging.data.query1.offset+paging.data.query1.limit)}} of {{paging.data.query1.total}} Total Records
Just add the total returned by the paged query.
And asking me this question just proves, that when you don't try to understand how the things work then for every little change you will need someone to edit the code for you and send it back to you.
Well, the ternary operator in my example does exactly this.
First of all I don't have to prove anything to you and I have tried to use your stuff for years, the biggest stumbling block has been you but this time I decided I needed to push through and stay with it longer. If that means asking for code then I will if you don't want to provide any then that will prove to me things as well. Wappler is a completely new workflow for many people to learn and is completely different from php that most of us have used for years.
Instead of being pissy all the time why don't your realize that not everyone is an expert or has your level of knowledge. If thats too hard to do then I recommend you no longer do technical customer support.
Mike, not sure i understand what exactly are you trying to say, but in my experience at DMXzone / Wappler for the past 11 years, it's always the people who refuse/don't want/don't have time/(put other excuses here) to follow the tutorials and manuals are the ones who always have troubles.
I never said you must be an expert, or have my/team's level of knowledge.
And that is actually exactly what i am saying - when a person is not an expert - giving them a piece of code will make the things harder and harder for them. Copying random code from page to page, will only lead to more and more troubles in the future and will only make the whole process of using Wappler look harder than it is.
If you follow the docs, everything will be much easier once you get familiar with the product.
Anyway, here's the code you need and i hope you're happy with it:
Records {{paging.data.query1.offset+1}} - {{paging.data.query1.page.current == paging.data.query1.page.total ? (paging.data.query1.total) : (paging.data.query1.offset+paging.data.query1.limit)}} of {{paging.data.query1.total}} Total Records