Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FileMaker Back Button by RecordID

Posted on 2008-06-13
13
Medium Priority
?
1,095 Views
Last Modified: 2011-09-20
I need a back button, and it's not going to be easy.

The db I'm working on has >40 tables with over 100 layouts and (far too) many self-joins. I've installed Back Magic from Seed Code, but that only restores layouts and tabs, not individual records. The rest of the road I'm on has me stuck.

I tweaked back magic to store RecordIDs, as they are the only thing I can think of that is a universally accessible (meaning I don't have to specify what table::field I'm looking in), constant, unique identifier. So how do I get there? The self-join via global calc field method is impractical, as is using any single field name (all the table specific record ids are uniquely named and I really don't want to script a case statement that runs through every possible layout to determine which table and field to look at).

So, the only thing the internet has turned up as viable thus far is.... apple script. Here's what I have:
"set thisID to \"" & $recordID & "\" " & ¶ & 
"tell application \"FileMaker Pro\"" & ¶ &
"tell database \"LR_Database\"" & ¶ &
"show record ID thisID" & ¶ &
"end tell" & ¶ &
"end tell"

and it works.... half of the time. The other times I get "Object Not Found" and "Unknown Error: -1728" anyone know why? anyone have any other ideas? If it can't be done in 30-45 minutes with less than 5 new table occurances, I can't do it.
0
Comment
Question by:mcpillsbury
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 600 total points
ID: 21783425
I am not sure 'show record', using the record ID works, because fm does not do it natively, so I doubt applescript can do it. try to remove that step as a test. if it turns out to be true, use recordnumber instead.
0
 

Author Comment

by:mcpillsbury
ID: 21786125
But it does work- about half of the time FM correctly jumps to the record ID and the other half it tells me object not found. Why for some record IDs but not for others (for instance record ids 57-142 load whereas 143-299 do not)?
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 600 total points
ID: 21786383
ok, ok... at=re these records still in the foundset when you try to display them again? or has the records foundset been changed in between by a further action?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Assisted Solution

by:jvaldes
jvaldes earned 160 total points
ID: 21791489
Have you looked at a free product designed by seedcode called backmagic?
0
 
LVL 9

Assisted Solution

by:jvaldes
jvaldes earned 160 total points
ID: 21791493
I think this solution will give you some great ideas on how to handle a back button, it did me...
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 600 total points
ID: 21791710
I think you did not read the question Juan, that's where he started!
0
 

Author Comment

by:mcpillsbury
ID: 21795277
the found set has changed. I'm ok with just displaying the record without the rest of the found set (in most cases it will be a record in one of three tables: People, People_on_Program, or Programs. we generally interact with these as individuals and not groups).
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 600 total points
ID: 21795483
yes, but it must be present before you navigate back to it. so can you do a 'find all' before trying to locate the record ID? or use a find instead of show?
0
 

Author Comment

by:mcpillsbury
ID: 21795753
sure- for that i need someway to set each table's id field on the fly. Do you know of a way to get the Set Field script step to specify a field by calculation?
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 600 total points
ID: 21795979
I am not with you... set field can use any calculation, so where is the problem?
0
 

Author Comment

by:mcpillsbury
ID: 21796116
sorry- let me clarify... I need to be able to set field based on context. If I'm on a layout that uses the people layout I need to search by person_id, for programs it's program_id. The set field step only lets me select from a list that references a specific field in a specific table.

To get around this I've tried Set Field with no field specified and then:
$table_and_field_name & "; " & $recordnumber
This mimics the Set Field [ Table::Field; Value ] format that the script editor uses, but doesn't actually evaluate out correctly. I've tried using the evaluate function in a number of creative ways as well, but that doesn't quite cut it either.

Thanks for sticking in here with me. I'm currently testing another AppleScript hack- passing the variable to AS and using it to generate the find request. So far I'm getting Unknown Error -10006 which I can't even find documentation for. Sigh.
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 600 total points
ID: 21800293
so, you wanna switch to a field of which the name is in another field or variable...
no, you can't do this, only the repetition can be defined.
and all you can do with eval is get the value from a field of which you specify the name as the eval argument, but that won't work for set field. I can't say more now, I don't know the seedcode solution, and can't spend time on it right now.
0
 

Accepted Solution

by:
mcpillsbury earned 0 total points
ID: 21807077
Well, it's not as elegant as I wanted and probably won't work over vpn, but I have an almost functional back button. It uses a slew of if statements to decide which field it should reference, and it has to run through it every time a layout/record change occurs and when the back button is pressed. I'll have to update the scripts every time I add a new table. Meh.

Thanks for your help lesouef- I'm going to close out the question.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question