Show in table only 10 record each time

Show in table only 10 record each time

  

Hi everyone,

I have a question, that i dind't see when i made all the beginners tutorial. It's problably something simple, but here it goes.

Let's say i have in a table (in the data base) 100 records, but when i display it on the page i just want to display each time 10 records, and then at the end of the page have naviggation buttons.

How do i do this? Can anyone help me.

Thanks for the help.
Hi Nuno,

You can download the exercise in the Paging & Sorting tutorial.
Is this what you were looking for?

Cheers,
Tiago Simões

Hi Tiago,

I think that's exactly what i wanted. I'm justed read it for a few moments but ti seemed what i wanted.

Thanks for the help Tiago.



Hi Tiago,

I was trying to display 5 record in a table, each time. I've followed every step of the tutorial you gave me but it's not working totally.

I have 15 record in my table, and i've decided that it should show 5 each time.

So on the bottom of the page it shows "1 2 3 next" wich tells me that he's making the math correctly. The problem is when i press the next button or the number "2", it only shows me one record, and the next page none.

Do you have any idea why this is happening?

Thanks.

Nuno
Hi Nuno,

One simple way of figuring out what you are doing wrong is to open a new project in service studio 5.1 and dragging one entity onto a screen, this creates all of the sorting & paging logic for you, then you have a well constructed structure to compare with yours and see whats wrong.

Hope it helps,
Hermínio Mira

Hi Hermínio,

The problem is that i have the free version, 5.0.2.8, so i can't do this.

Does anyone knowes how i can debug this problem?

Thanks.

Nuno
Nuno,

That's no problem since you can install Service Studio 5.1 and do the test anyway, you just won't publish it. And it won't "break" your Service Studio 5.0, altough your oml files will then open on 5.1 so I suggest you uninstall it after this experiment.

Cheers,
Hermínio Mira

Hi Hermínio,

I have done what you told me, and the only difference i see in the action "refresh table". I only do a query and then refresh it....

The code that was created is a litble bit more diferent. Do you think it can be this?

Any more ideas?

Thanks.

Nuno

Anyone?

If i press the "next" button or the numbers, i have the feeling that it never changes, because the "previous" button never gets active.
Nuno,

Can you submit an example oml in which you have that problem? Might be the fastest way to help you get past this.

Hermínio Mira
Hi Hermínio,

Shure can. It's in attachment.

It's the show_regtrad, webscreen.

Thanks.



Hi Evereyone,

I've followed every step of the tutorial and i can't get this to work.

I even followed the Hermínio suggestion of creating this in the version 5.1, but it was way to different.

Can anyone help me?

Thanks.

Nuno

Well, i tried something and now it's almost working.

What i did was follow the advice of Hermínio and add an entity to the screen and saw what kind of code it generated.

I copied the "screen" action to my page and made the necessary modifications.

When i run the project it shows correctly the pages, but the problem is when i press the "next" or "previous" buttons". It doesn't do anything.

If i press the numbers of the pages i want to go it shows the records correctly, but if press "previous" it shows the same record.

Does anyone knows what might be wrong?

Thanks.

Nuno
Hi Nuno,

You need to put a container around the TableRecords and the List_Navigation and in the Refresh_table action you need to refresh the whole container instead of only the table records. (see attachment)

Cheers,
Tiago

Hi Tiago,

I've updated my version to the 5.1, so now i cannot open the file you sent me.

I'm sending you mine, to see if you figure out what i'm doing wrong.

Thanks for the help.

Nuno.

PS - i will unistall the lastest version, to see the changes you made

Hi Tiago,

It's working now.

I added the container and it's now working.

I din't know i had to do that....

Thanks a lot again.

Take care.

Nuno