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

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

Recommended Posts

Posted

I am baffled,

I have a solution that has a multy level system. that is to say I have a job table which has a portal to a line item table. The line items (called Descriptors) also have a line item file attached to them. I wrote a script that would take all the piece parts from the Descriptors and place them into a separate file called BOM. When I run the script with the debugger with some test Descriptors, it works flawlessly (although slowly,I am sure there is a better way ) but when I do it with a real job consiting of hundreds of Descriptors, the script seems to miss some items and set some incorrectly. The volume couldn't possibly be the problem. I am pulling my hair out trying to figure it out. Can someone look at the script and tell me what the heck I am doing wrong? And pleas don't laugh at the novice approach.

The script in question is BOM. the main problem seems to happen during the "sBOM JLI" portion.

I know this is asking alot and I appreciate anyones input

Thanks

Bidtest.zip

Posted

If I have understood this correctly, you have a basic list of things that make up a Job. Each Job LineItem can have many parts (Descriptors), and each of those can have many components (Descriptor LI). You are then trying to create a materials list for the particular Job you are on from the master Job list of components (Descriptor LI).

This is my version, which goes to the related Descriptor LI records directly from Job, and imports those into the BOM table. My record count came out to be 220, instead of the 127 using your method. I don't know if that accounts for the missing records you were noticing or if there is something else going on.


Set Field [ Descriptor LI::gOption; Job LI::Option ] 

Set Field [ Descriptor LI::gJobID; Job LI::Job ID ] 

Go to Related Record [ From table: "Descriptor LI"; Using layout: "DLI Table" (Descriptor LI) ] [ Show only related records ] 

Go to Layout [ "BOM Table" (BOM) ] 

Import Records [ Source: "file:Bid test.fp7"; Target: "BOM"; Method: Add; Character Set: "Mac Roman";   

     Field Mapping: 

     Source field 2 import to BOM::Descriptor 

     Source field 7 import to BOM::Qty DLI 

     Source field 9 import to BOM::DLI ID 

     Source field 33 import to BOM::Option 

     Source field 34 import to BOM::Job ID ] [ No dialog ] 

Go to Layout [ original layout ] 

Note that I added gOption as field 33 and gJobID as field 34 to Descriptor LI, so the import could be done in one step.

Posted

Thank you for your response,

The problem I have with that method however is the quantity. I get the quantity of each line item in the descriptor, but I need to multiply that by the descriptor Quantity in the Job line item file.

But I did figure out my gremlin. I had the go to related record line, but some of my descriptors do not have line items, so it got all messed up, so I put an if statement in the script to allow for descriptors without line items and it works fine. but I would like to speed up the process.

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