Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

i'm performing a find and want to return the results. each result must be in an html <table> or <div> tag. thats just how it has to be, trust me. the problem is, i want to tile the results across the screen, from left to right, and then top to bottom.

i cant think of any way to do this with any of the CDML tags. any help?

<table border="0" cellspacing="0" cellpadding="0">

<tr>[FMP-Record]

<td>[FMP-Field: field1]</td>

[/FMP-Record]</tr>

</table>

is a start for horizontal search results but can you give me some more info on how it should be on screen?

Just one field?

Is it not possible to create a calculation field "newrow" that says:

If(Mod(Status (CurrentRecordNumber), 10)=0, "</tr><tr>", "")

it should look like this than:

<table border="0" cellspacing="0" cellpadding="0">

<tr>[FMP-Record]

<td>[FMP-Field: field1]</td>[FMP-Field: newrow]

[/FMP-Record]</tr>

</table>

edit: if it works please let me know and if I made some mistakes, I will post it on http://www.ib2.nl/filemaker/ then. You also may submit it of course smile.gif

  • Author

hi,

that is exactly what i needed. i hadn't thought of the Status(CurrentRecordNumber) thing. thanks a million,

tim.

Here is a Javascript for placing a sorted find into three colums:

	<script language="Javascript">

var z = 0;

var aCustomers = new Array();

var aCustomerIDs = new Array();

var iCustCount = [FMP-CurrentFoundCount] ;

var rows = Math.ceil(iCustCount / 3) ;

[FMP-Record]

aCustomers[z] = "[FMP-Field:cust_name, raw]" ;

aCustomerIDs[z] = "[FMP-Field:cust_id]" ;

z += 1 ;

[/FMP-Record]

function addbusiness(cust)

{

var cust ;

document.newquotefm.cust_id.value = cust ;

document.newquotefm.submit() ;

}

</script>

</head>

<body><form name="newquotefm" action='http://[FMP-CurrentToken:0]:[FMP-CurrentToken:1]/FMPro' method='post'>

<input type="hidden" name="-db" value="quotes.fp5">

<input type="hidden" name="-lay" value="web">

<input type="hidden" name="-format" value="/digi_lan/editquote.html">

<input type="hidden" name="-token.0" value="[FMP-CurrentToken:0]">

<input type="hidden" name="-token.1" value="[FMP-CurrentToken:1]">

<input type="hidden" name="-token.2" value="[FMP-CurrentToken:2]">

<input type="hidden" name="prepared_by" value="[FMP-ClientUsername]">

<input type="hidden" name="cust_id">

<input type="hidden" name="-new">

Click on a Customer Name for new quote:

<table>

<script>

for(j = 0; j< rows; j++)

{

document.write("<tr><td><a href=Javascript:addbusiness('" + aCustomerIDs[j] + "');>" + aCustomers[j] + "</a></td>");

document.write("<td><a href=Javascript:addbusiness('" + aCustomerIDs[j + rows] + "');>" + aCustomers[j + rows] + "</a></td>");

document.write("<td><a href=Javascript:addbusiness('" + ((aCustomerIDs[j + (2 * rows)] === (void 0)) ? '':(aCustomerIDs[j + (2 * rows)])) + "');>" + ((aCustomers[j + (2 * rows)] === (void 0)) ? '':(aCustomers[j + (2 * rows)])) + "</a></td></tr>");

}

</script>

</table></body>

The results run sorted down a colum then onto the next colum.

Hope this is of interest.

Garry

don't you think my solution is cool enough smile.gif

The CDML is a good method, nice and neat! However, the Javascript is good if you want to take some of the processing away from the server, and if you want to 'fiddle' with sorts and the direction in which they are displayed.

It is one I used some time ago, so it has just been copied-and-pasted from that application.

Good to see a couple of alternatives. smile.gif

All the best.

Garry

I just read Timmys post on the ODBC forum. Here is a simple method:

<table><tr>

<script>i = 1 ; nCols = 3 ;[FMP-Record]

if ((i % nCols) == 0)

{ document.write("<td>[FMP-Field:name]</td></tr><tr>") ; }

else

{ document.write("<td>[FMP-Field:name]</td>") ; } ;

i++ ;[/FMP-Record]

</script></tr></table>


This is as straightforward as ASP, PHP etc. wink.gif

All the best.

Garry

  • Author

Sharky.

It doesn't work for me. It works fine when I'm doing a find all, but when I search for anything, it seems that the Current Record Number doesn't get updated. I posted a question on this in this forum. Thanks for the help,

Tim.

did you make sure the field isn't stored (see store options below the calculation)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.