Jump to content

Is It Possible To Display Last 20 Records Of A Table?


Recommended Posts

Hello Cameron,

 

You can create the lookup table with the field with 'Autonumber' DataType.

On the 'Configure Search Fields' select 'Dropdown' form element, 'Greater Than' comparison type, the 'lookup table' source, sort by Z->A for the fieldwith 'Autonumber' DataType. 

 

Than to add the next code in the Header:

<div align="center"> <p>Processing...</p> <img src="images/progress_bar.gif" alt="Progress Bar" width="200" height="15" /> </div>

and to add the next code in the HTML block:

<script type="text/javascript">


function my_funct()
{
  document.getElementById("Value1_1").options[20].selected = true;
}


if(document.getElementById("caspioform")) {


  document.getElementById("caspioform").style.display = 'none';
  setTimeout('my_funct()',500);
  setTimeout('document.forms["caspioform"].submit()',1000); }
  
</script>

Hope it helps.

Link to comment
Share on other sites

Hello EdTheStatMan,

 

How i did this:

 

I added the field with the Autonumber" datatype to the Search page, selected "Greater than" in "Comparison type", then I selected the "Dropdown" form element.

 

When I selected this form element, the Field options sections opened. Here I selected "Lookup table or view" in "Source". Near "Sort by" the "AZ" button was displayed, I clicked it - and the button changed to "ZA".

 

Then I added the Header & Footer (via the button near the "Preview" button), selected "Header", clicked the "Source" button and entered the first part of the code:

<div align="center"> <p>Processing...</p> <img src="images/progress_bar.gif" alt="Progress Bar" width="200" height="15" /> </div>

 

Then I clicked "Footer", clicked the "Source" button and entered the second part of the code:

<script type="text/javascript">
function my_funct()
{
  document.getElementById("Value1_1").options[20].selected = true;
}
if(document.getElementById("caspioform")) {
  document.getElementById("caspioform").style.display = 'none';
  setTimeout('my_funct()',500);
  setTimeout('document.forms["caspioform"].submit()',1000); }
</script>

 

It works on my DataPage. Does it work on yours?

Link to comment
Share on other sites

Hello Ed,

 

I'm sorry that my instructions didn't help. Have you only one field on the Search page? Could you make a screenshot of the settings of the field with the "Autonumber" DataType? I'm not very good with all these features, but maybe I can compare settings and find the difference.

 

I think, not so many people have asked for this functionality. And I hope that they add it in the new releases.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...