Jump to content
Server Maintenance This Week. ×

Numbering portal lines


Rafa

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

Recommended Posts

Are you printing from the Invoices file or the Line Items file? If you're printing from the Invoices file, place a text block in the portal with "##" in it. This will give the row number for each portal.

If you're printing from the Line Items file or if you need the number to not necessarily be in order of line items (such as when you have three line items numbered 1, 2 and 3, you delete the one that is number 2 and you still want the last one to show up at 3) then you need to use a script to create the new line items and set the number at that time.

Chuck

Link to comment
Share on other sites

Basically in the Invoices file you need a field called something like Next_LineItem_Number which defaults to 1. In the Line Items file you have a field called LineItem_Number. When your script creates a new related line item, you use the Set Field command to set the LineItem_Number to Next_LineItem_Number and then set Next_LineItem_Number to itself plus one.

Exactly what the steps are going to be depends on the existing new line items. Does your script create the related record from the parent database or from the child database? I tend to write my scripts so that they create new related records from within the parent database, so that's where I would need my two Set Field steps.

Chuck

Link to comment
Share on other sites

Thank you, Chuck.

I'm printing from Invoices, but I need that each line keeps its own identity always, independently of the sort order or the like. That's why "@@" (or you really meant "##"?) doesn't work. The steps of the script that you mention is what I'm looking for.

Thank you.

Link to comment
Share on other sites

This topic is 8324 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.