Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

[FMP-If: CurrentRecordNumber ] Greater and less


rivet

This topic is 7849 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 7849 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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