Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Scripts between 2 databases


Audio Freak
 Share

Recommended Posts

Hi, What I have is a inventory database and a purchasing database. what I want to do is be able to push a button that will find all the records in the inventory db that the order status has changed to order. I have a status field that changes to order if the qty in stock goes below the lower limit(works fine). I need it to find those records then go to related records in purchasing. Pause for a few seconds(to allow me to place them on order if need be) then go back to inventory and move to the next record in the found set and do it again until all records have been checked. I can't seem to get this to work, it stops after finding the related in purchasing and does not return to the inventory db. Suggestions?

 

Thanks in advance, Michael

Link to comment
Share on other sites

If I understand you correctly, the following should work.

In your purchasing db create a script with only Pause/Resume Script[]

In your inventory db, perform your find, then create the following script

 

Perform Find[Restore]

Go to Record/Request/Page[First]

Loop

Go to Related Record[show,"Relationship Name"]

Perform Script[sub-Scripts,External:Purchasing.fp5,Pause]

Go to Record/Request/Page[Exit after last,Next]

End Loop

 

If you want, add a pause before the End Loop so that you can see that you have returned to the inventory db and moved to the next record.

 

Hope this helps

Link to comment
Share on other sites

Sistrother, That is perfect! Exactly what I was looking for. The mistake I made was leaving out the loop script step. Thanks a bunch.

 

Michael(Born in Long Beach) laugh.gif

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I have a question that may be similar to the above. I have a tank database, and a frog database. The tank database record has a portal containing related records from the frog database. There may be multiple frogs in each tank, so this is a one to many relationship, is that right? Anyway, I am wondering if there is a way to use a scripted button to go from the tank database to the frog database, find all the related records, and display them. I'm using GoToRelatedRecord currently, which works fine if there is only one record, but there are often 3 or 4 records. I have tried a couple of scripts which loop through the portal rows, but I'm not really sure what to do after that, and I just end up in endless loops. If anyone could offer a suggestion, I would really appreciate it.

Link to comment
Share on other sites

Hi Maura,

The Go To Related Record script step includes a checkbox option to 'Show only related records'.

 

With the 'Show' option checked, the effect will be akin to performing a find for the related frog records in the frog database - any records relating to frogs that are not in the current tank will be omitted.

 

If you create a list layout in your frogs file, and a script in that file which has the Go To Layout [ListLayout] command in it, you will be able to set up a script in your tanks file as follows:

 

Go To Related Record [show, "Frogs"]

Perform Script [sub-scripts, External, "Frogs.fp5"]

 

...where the external sub script is the one that takes the user to the list layout.

 

Then when the script in the tanks file is run, users will see a complete list of all the related frog records.

Link to comment
Share on other sites

  • 1 month later...

Hi Maura ~ Ray's the Greatest: he helped me heaps! I like your project with Tanks and Frogs.

 

If you have many Tanks and many Frogs, it might be worth setting up a many-to-many relationship through a Joining File that contains Tank ID, Frog ID, Date Stamp and any data about the specific event such as Feeding, Grooming etc. It may be important to do if the frogs get transfered from one tank to another during the course of their lives.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use