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

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

Recommended Posts

Posted

Hello everyone

I'm facing a new challenge. I have 2 FM databases. The first is used by the estimation team and it's all about estimating house construction projects. The second, the Management db, one is used for managing clients, ISO 9001, production etc. and is widely used by the employees. Now I'm working on creating a complete shipping list in the management db and I need to import informations from the estimation db.

For example. All the doors and windows and their quantities is in the estimation db. What I need to do is go to the windows and doors Line items layout by using the $$projectID (from the management db) I will need to loop the script to gett al the doors and windows and each time extract 2 fields and put them in the shipping list layout of the management db.

I have made tons of scripts of all kind but I really don't know how to deal with moving datas from one database to another.

I'm looking for examples of scripts and how to use them.

Can I do this with just one script in the management db ?

I guess I'm going to use Get (scriptparameter) ... I need some tips, references or examples please.

Thank you so much.

  • Like 1
Posted

Hello everyone

I'm facing a new challenge. I have 2 FM databases. The first is used by the estimation team and it's all about estimating house construction projects. The second, the Management db, one is used for managing clients, ISO 9001, production etc. and is widely used by the employees. Now I'm working on creating a complete shipping list in the management db and I need to import informations from the estimation db.

For example. All the doors and windows and their quantities is in the estimation db. What I need to do is go to the windows and doors Line items layout by using the $$projectID (from the management db) I will need to loop the script to gett al the doors and windows and each time extract 2 fields and put them in the shipping list layout of the management db.

I have made tons of scripts of all kind but I really don't know how to deal with moving datas from one database to another.

I'm looking for examples of scripts and how to use them.

Can I do this with just one script in the management db ?

I guess I'm going to use Get (scriptparameter) ... I need some tips, references or examples please.

Thank you so much.

Why don't you simply relate the tables of one file to the other? Scripting Imports then becomes redundant.

RW

Posted

Why don't you simply relate the tables of one file to the other? Scripting Imports then becomes redundant.

RW

HELLO

ok I Lost a lot of time on this, but yes I related the tables, found out how to use the script parameters to bring back the data I need. For one data it works just fine. Now I'm stuck again (and a bit frustrated). Because I made a script that goes to my window table and tried to make it loop, but for some reason the Go to Record/Request/Page [Exit after last] doesn't work.

I have my original window

I open the other database, give a new name to this window (LI_PF).

I goes to the related record on the right layout.

I perform my script, retrieve my data from the first record, put them in the other db

then I select the LI_PF window. Look like it comes in front.

and the go to next record doesn't work, it seems to work on the original window.

and my loop end.

In fact I think I just can't go to the LI_PF window... the script always comes back to the original database.

Somebody please tell me the right way to do this.

here are the scripts:

Generer Portes et fenetres

Set Window Title [ Current Window; New Title: "LC" ]

New Window [ Name: "LC_LI_Item" ]

Go to Layout [ “PP_LC_LI_ALL_Chargement” (PP_LC_LI_ALL_Chargement) ]

#

Select Window [ Name: "LC"; Current file ]

#

Open File [ “Estimation” ]

Set Window Title [ Of Window: "Estimation"; New Title: "LI_PF" ]

Go to Related Record [ From table: “LI_PF_Cedule”; External; Using layout: “LI_PF_Cedule” (LI_PF_Cedule) ] [ Show only related records ]

Loop

Perform Script [ “Constante Portes et fenetres”; Parameter: LI_PF_Cedule::qty & "¶" & LI_PF_Cedule::LC_cDesc ]

Select Window [ Name: "LI_PF" ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

#

Posted

OK I made a test

I added a Set Variable[ $$window ; Get (WindowName) ] right after my Select window and it give me the "LI_LC_Item" as a result and I also put it right after the Open FIle "Estimation" and it return "LC" which is the first window open it the first database. So clearly the Select window doesn't work with the second file.

WHat am I suppose to do to go back to that window and perform a Loop?

Any idea anyone?

I'm desperate.

... and I read it was easy to work with multiple databases !!! Pffff!

Posted

OK I got it

I had to create the complete looping script in the second database and call the rest of it in the first. and all is working real fine.

This is the kind of detail that should be in the Help. I read the help, the bible, the forums I don't know how many times.

I'm glad it's done but my brain is melting.

bye

Posted

... and I read it was easy to work with multiple databases

I am not sure I'd say that - but it can be much easier when you have TOs and layouts for the other file tables in the current file. Which of course brings up the question why use two files to begin with...

  • 2 months later...
Posted

I am not sure I'd say that - but it can be much easier when you have TOs and layouts for the other file tables in the current file. Which of course brings up the question why use two files to begin with...

An oldie but I can answer. The first db generates houses estimations and it's heavily used buy 3 peoples an it's heavily scripted. the other is for all the employes and it's used more gently... I don't want any database to lag because of the other. Which happen anyway because the ******* server is so slow. ;-)

Bye

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