Jump to content
Server Maintenance This Week. ×

help with navigation script


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

Recommended Posts

using FMP for a long time, but I am a rank amateur.

I have a DB of a TV script pdf . on each page there is a page number and the individual scene numbers.

It has a page number field and a portal to put the scene numbers in text on the page. The portal is from a table that has 2 fields,

 the scene numbers and the page number. the page number is used to create the relationship.

I want to create a script or calculation for when a scene number is typed in, the tv script goes to the page with that scene on it.

the steps are

1. on the script page type the scene number you want to go to

2. that input would be used to  go to the 2 field table and where the scene number matches, it would get the page number from this table

3. take that page number result and navigate to that page number in the tv script document.

if anyone could suggest what functions I need...

thanks

Ian

 

 

 

Link to comment
Share on other sites

For the purposes of sanity, let's give your tables names, say Pages for the parent table and Scenes for the child table.

You can navigate to a Page record that is the parent of Scene X directly by performing a find. For example, a script like:

Enter Find Mode[]
Go to Layout [ Pages ]
Set Field [ Scenes::SceneNumber ; SomeTable::gSearchValue ]
Perform Find

would find the page that contains the scene number entered into a global gSearchValue field (which can be in any table).

However, this would replace your existing found set in the Pages table. If you only want to move to the target record within the current found set, you would need to loop until:

not IsEmpty ( FilterValues ( SomeTable::gSearchValue ; List ( Scenes::SceneNumber ) ) )

returns True. And of course, it would fail if the target record is not in the current found set.

 

Link to comment
Share on other sites

I question the use of FileMaker for this. Seems like you’re searching a script for a scene number. Couldn’t that be accomplished in a pdf viewer?

Link to comment
Share on other sites

Its something more than a simple script document . It is called a lined script for use in tv and film editing. It has another table of facing pages which describe the individual shots that make up a program. I use a one to many relationship to put these facing pages in line with the script.  I am making progress with Comments suggestion.

I never used a global field. I can see how powerful it is combined with a script trigger.

(spoken like a true amateur)

Link to comment
Share on other sites

one other question about approach.  The filter-- which is a calculation,

not IsEmpty ( FilterValues ( SomeTable::gSearchValue ; List ( Scenes::SceneNumber ) ) )

is working ...It is returning a value of 1 in the global field where I want it. Is there a way to just go to that record in the table I want?

Or can I only achieve this by a loop?

Edited by Ian Slater
Link to comment
Share on other sites

3 minutes ago, Ian Slater said:

Is there a way to just go to that record in the table I want?

Not directly, because there is no way to identify the page record you want by the value of one of its children's scene number. A parent stores no data about its children; it's only the child that "knows" it parent's key.

If you prefer, you could perform the find in the Scenes table, and then use the Go to Related Record script step to "go directly" to the parent Page record of the found scene.

 

Link to comment
Share on other sites

both tables have the page number. I have them set in a relationship table. The page number from the child works correctly when I put it in the parent table, but the filter, a calculation field  which shows "1" in the correct record in the child, based a global , only shows "0" when I put it in the parent... oh so close....

Link to comment
Share on other sites

54 minutes ago, Ian Slater said:

both tables have the page number.

Well, yes - but you want to start by entering the scene number, not the page number, right? So the question is how to map the entered scene number to the corresponding page number.

 

59 minutes ago, Ian Slater said:

oh so close....

Perhaps you should explain in more detail the scenario you are struggling with. Seemingly, this is a trivial task: you know the number of the scene, and the scene record with that number has the page number you want.

 

 

Link to comment
Share on other sites

Thanks for the reply.   The DB has 2 related tables.  They are PDFs . "Pages" and "scenes".

I want to be able to on the "pages" table type a scene number and jump to the page record that contains that scene number.

I have constructed a table that works as a table of contents. 

So when you enter the scene number in the global scene field, no matter what page you are on, it would go to the page  with that scene number.

in the attached table which is the toc, sc 18 is entered in the global scene field. using your suggestion a true value is calculated in the scene filter field. Scene 18 is on page 6. But i do not know how to move to page 6 in the table "pages". 

Screen Shot 2022-07-05 at 5.21.12 PM.png

Link to comment
Share on other sites

2 hours ago, Ian Slater said:

I want to be able to on the "pages" table type a scene number and jump to the page record that contains that scene number.

So what objection do you have to the very first suggestion I made: perform a find in a layout of the Pages table, searching the related scene number field. All you need for this is a global field in which to type the scene number and the script shown in my first answer above. (In fact, even the global field could be replaced by a custom dialog within the script - but that may not be the most convenient user interface.)

 

Link to comment
Share on other sites

39 minutes ago, Ian Slater said:

i need all the records not just the found one

Then add the Show All Records step at the end of the script. The found set will include all page records, but you will still be on the one page record that was found.

 

Link to comment
Share on other sites

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