April 10, 200322 yr Is there a way to set a range in an if statement? I am trying to break the results into different columns so: 0-4 in column 1 5-8 in column 2 9-12 in column 3
April 11, 200322 yr Hi, If you want to display a search in columns, the easiest way is to use inlines and the 'skip' function. In your example, set a max of 4 for your initial search, then column 2: Inline with ,-skip="4",-max="4", column3:Inline with ,-skip="8",-max="4", etc. (i think you do need those quotes around the numbers) You can then use the "Currentfind" "FindFieldItem", "FindValueItem" tags to build the Inline searches. regards, jeff PS: the knowledgable on the list can do this is javascript instead, but this is the quick-an'-dirty easy way.
April 11, 200322 yr Here is a javascript method I have used to produce three columns of names which are ordered alphabetically down the colums. <script language="Javascript"> var i = 0; var aCustomers = new Array(); var aCustomerIDs = new Array(); var iCustCount = [FMP-CurrentFoundCount] ; var rows = Math.ceil(iCustCount / 3) ; [FMP-Record] aCustomers[i] = "[FMP-Field:cust_name, raw]" ; aCustomerIDs[i] = "[FMP-Field:cust_id]" ; i += 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> Hope this is of interest. Garry
Create an account or sign in to comment