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

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

Recommended Posts

Posted

I would like to script the page number into a defined field so they can be reused later in a contents page. Unfortunately I don't seem to have the right technique. (see attached file). At the completion of the script the first record shows the total number of pages and the other record shows zero.

in summary the script is

Go to Record/Request/Page

[ First ]

Enter Preview Mode

Loop

Exit Loop If [ Get(LastError)≠0 ]

Set Field [ test::pagenumber; Get(PageNumber) ]

Go to Record/Request/Page

[ Next ]

End Loop

Set Field [ test::pagenumber; Get(PageNumber) ]

Go to Record/Request/Page

[ First ]

Enter Browse Mode

test.fp7.zip

Posted

I am afraid this is a bit more complex than that - see;

http://fmforums.com/...ble-of-contents

Thanks and indeed - especially as some of the records are multiple pages. I solved this by running a check script which opened a new window via a self relationship to count the number of pages of that record. and adjust. This is a bit clunky but seems to work. The contents page uses the calculated page number and the main body of records use the built-in page numbering system ("//").

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