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

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

Recommended Posts

Posted

ok here are the 2 scripts. what is wrong with this and why isnt it working correctly?

this script is called "saving sets" where depending on what the field (Save Set Chkbox) with the value lists is "1", "2", "3", "4", "5" it saves it to "savedset1.fp7" or "savedset2.fp7...savedset5.fp7)

//Script saving sets below (all files save correctly as a copy) It's the loading script that doesnt work

If [Main::Save Set Chkbox = 1]

Export Records[No dialog; "savedset1.fp7", unicode (utf-16)

Save a Copy as ["savedset1.fp7"; copy]

Else

If [Main::Save Set Chkbox = 2]

Export Records[No dialog; "savedset2.fp7", unicode (utf-16)

Save a Copy as ["savedset2.fp7"; copy]

Else

If [Main::Save Set Chbox = 3]

Export Records[No dialog,"savedset3.fp7"; unicode (utf-16)

Save a Copy as ["savedset3.fp7; copy]

Else

If [Main::Save Set Chbox = 4]

Export Records[No dialog;"savedset4.fp7"; unicode (utf-16)

Save a Copy as ["savedset4.fp7"; copy]

Else

If [Main::Save Set Chkbox = 5]

Export Records[No dialog;"savedset5.fp7"; unicode (utf-16)

Save a Copy as ["savedset5.fp7"; copy]

End If

End If

End If

End If

End If

//loading set script

If[Main::Save Set Chkbox = 1]

Import Records [No dialog;"savedset1.fp7"; Update matching; Windows ANSI]

Else

If[Main::Save Set Chkbox = 2]

Import Records [No dialog;"savedset2.fp7"; Update matching; Windows ANSI]

Else

etc.....to savedset5.fp7

End If

End If

End If

End If

End If

Problem: My main database with all records is called, "my database"

I have 2 buttons (save set, load set)

The save set button performs the saving sets script and functions properly and even creates a "savedset#.fp7" if not alreadt created.

My load set button does not work. My processor shows its working by lagging for a few seconds and then it just shows all records.

Well if i hit "show all records" button thats fine, but i am trying to import the records from the "savedset#.fp7" file into "my database" and only show those records.

That way when i am done with that savedset#.fp7 file i can hit "show all records" and be back where i was.

Does anyone see the problem here and know the solution?

Thanks for your help, i know my last post was vague...so i deleted it

Posted

I'm curious what this procedure is for. I can imagine easier ways to capture a found set.

Posted

I'd do this by storing the IDs for each group of records in a field, and use this in a self-join relationship to change the found set.

To get the found set's IDs into a field, you can navigate to a layout with only the ID field and use the Copy All Records script step, or if you wish to leave the clipboard undisturbed you can use a loop to append the IDs to the target field.

Since you want to remember multiple found sets, I'd recomend storing the IDs in a Sets table. They can then be referenced by name or number, and you can use a Go To Related Records[] step directly from this table to pull up the found set.

Posted

ok i will give that a try sometime tomorrow after work and let you know how it works, otherwise what do you or anybody else think from my example? i wonder if i post this in th efm pro 7 forum i would get more input.

Ender, do you think my way can be done, do you think it is feasible...Size is not a problem because at most my saved sets will be roughly <= 400 records

Posted

I just don't see a good reason to use exports and imports for this. It's much faster to leave the records where they are and simply jump to the right ones through a relationship.

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