June 20, 200619 yr Hey gang, Is there a symbol or merge to insert the total records in a table onto a layout. I thought I saw something like that somewhere. I have @@ for the record but I want it to have @@ out of ?. Can this be done? Thanks Mike
June 20, 200619 yr You would think so, but no, you need to create an unstored calculated field: Get ( FoundCount ) -- or use a script to set that calc into a global.
June 20, 200619 yr AS Fitch said an unstored calculated field; Here's the calc as supplied to me by another on this forum: If( $$FoundCount ≠ Get(FoundCount); Let($$FoundCount = Get(FoundCount); zippScript_PerformScript( Get(FileName); "Refresh" ) ) ) & Let([ $$ActiveRecord = Get(RecordID); Tc = Get(TotalRecordCount)]; "Record " & Get(RecordNumber) & " of " & " " & $$FoundCount & If($$FoundCount ≠ Tc; " Found"; " total") ) You must also download the free plugin "ZippScript." http://homepage.mac.com/WebObjects/FileSharing.woa/wa/default?user=jkornhaus&templatefn=FileSharing3.html&xmlfn=TKDocument.3.xml&sitefn=RootSite.xml&aff=consumer&cty=US〈=en HTH Al
June 20, 200619 yr I'm not sure what specific problem you're trying to solve with that calc + plugin, but it's not necessary to do all that just to display the found count on a layout.
June 20, 200619 yr Er, you could also use Fitch's original suggestion: Get ( FoundCount ) without the script (you forgot to include what the "Refresh" script does) or plugin... *apologies bout the overlap Edited June 20, 200619 yr by Guest overlapped post
June 21, 200619 yr I have @@ for the record but I want it to have @@ out of ?. Can this be done? This gives you "Record # NN of NN records which I believe is the question. If I'm not mistaken Get ( FoundCount ) just gives you a number. Also want to correct myself. I got the formula from Ray Cologon at Nightwing Enterprises. "The technique uses an embedded script trigger (via the free zippScript plug-in developed by John Kornhaus) to refresh the screen when the found set changes. If necessary, the plug-in may be downloaded by visiting the Resources page on the NightWing Enterprises web site at: http://www.nightwing.com.au/FileMaker/Resources.html " The field can be placed on any layout, on a portal, a list view or a standard form layout and it will tell you what record you are on and how many records in the found set.
June 21, 200619 yr ... i use this all the time on all my layouts seeing as i detest the filemaker nav... plus i needed more room: "Record: " & Get(RecordNumber) & If(Get(FoundCount) ≠ Get(TotalRecordCount) ; "¶Found: " & Get(FoundCount) ; "" ) & "¶Total: " & Get(TotalRecordCount) Which returns a string such as the following when you are looking at the foundset: Record: 1 Found: 3 Total: 17 when all records are being displayed: Record: 1 Total: 17 Then again, you could use Record X of X which would just be "Record " & Get(RecordNumber) & " of " & Get(FoundCount) - but i find this isn't as clear. Either way you have to use an unstored calc field and aldipalo i'm still confused what your trying to do and why your using variables and apparantley a script to achieve this... ~Genx
June 21, 200619 yr You are right I did have a shortened version which I should have displayed. Let([ Fc = Get(FoundCount); Tc =Get ( RecordNumber )]; "Viewing " & Tc & " of " & Fc) & " records." which doesn't need the plug-in and works just fine as well.
June 21, 200619 yr I don't really think using a let function is entirely necessary in this case, but each to his own i suppose.
June 21, 200619 yr Look, the OP just wants to show the found count. ALL you need is a calc field, let's call it... I don't know... "FoundCount"... The calc? Get ( FoundCount ). Make sure it is UNstored. Now you can put on the layout: "Record @@ out of <>" and you're all done. These pretzels are making me thirsty!
Create an account or sign in to comment