![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi, Hi group, I sent this message a few days ago, but got no replies. Maybe I am not clear in my explanations. Please let me know. In any case: can you help me with this? TIA I am running a Server/Client solution (FM 5.0 Server /FMPro 5.5 v3 / Win 2000 / TCPIP) DB1 - master, step1 DB2 - portal, related records DB3 - master, step2 The user, being in RECORD1-1 in DB1, in a layout that shows a portal (PORTAL1-1) with related records from DB2, chooses a button that runs SCRIPT1. The script creates a new record (RECORD3-1) in DB3 using info from the current record (RECORD1-1). Then goes through a loop that moves from the first to the last record in the portal (related records from DB2) "assigning" this records to RECORD3-1 in DB3- The final result is the new record in DB3 that shows a portal containing exactly the same related records that RECORD1-1 showed in PORTAL1-1. I use this procedure to invoice a project. This way, I create a new invoice that takes some info from fields in DB1 and copies the related records (the products to be invoiced) to the new invoice. The problem I have is that, being in a network environment with many users, it happens from time to time that one or more records in PORTAL1-1 are lock by some users at the moment of invoicing. If this happens, the program start creating endlessly new lines in the related portal. I need a way to control if related records in PORTAL1-1 are being used, and, if they are being used, either skip the invoicing at all, or maybe wait until the record becomes available (this might probe a problem after all if the user does not release the record promptly). Maybe advising the user to unlock the record is a solution? Any ideas? Thanks Jon |
#2
| |||
| |||
|
|
I guess I don't understand why you are using a script. Why not set up the relationships and portals in such a way that you can create a new record as desired directly in the portal? ... it sounds like DB1 contains the info needed to create the invoice. It sounds like DB3 contains the invoices. It's not clear to me what DB2 is for. |
|
If all the info needed for invoicing is in DB1, and the invoices are in DB3, a simple approach would seem to be to define a relationship between DB1 as master and DB3 as related.... This allows a one-to-many relationship, with each record in DB1 having many related records in DB3 |
|
Bill |
#3
| |||
| |||
|
|
in article b16fiv88unknttu81rm9pqh61sp32u0j6s (AT) 4ax (DOT) com, Jon Gutiérrez at jguti (AT) qqqhotmail (DOT) com wrote on 30/7/03 8:05 PM: I need a way to control if related records in PORTAL1-1 are being used, and, if they are being used, either skip the invoicing at all, or maybe wait until the record becomes available (this might probe a problem after all if the user does not release the record promptly). Maybe advising the user to unlock the record is a solution? Do a search on "record locking" within comp.databases.filemaker at http://www.google.com/advanced_group_search?hl=en Lynn Allen in particular has posted some useful and informative articles on this topic. Or perhaps Lynn herself could dazzle us all (for the nth time) with even more cutting edge techniques for overcoming this problem?! Bridget Eley |
![]() |
| Thread Tools | |
| Display Modes | |
| |