Slobey Posted November 21, 2008 Share Posted November 21, 2008 Hi everyone, I wasn't sure where to post this but here goes. I have a solution that has a job table and a Job line item table and a unit table. I have a portal for the line item table on the job screen. when I enter a unit code, it populates the description, price and unit of measure from the unit table based on lookups. That works fine, but I also need it to populate a region field based on a lookup from the job file. It does not populate on the first line just every line after that. I assume it has something to do with the relationship not being committed in time to look up the first line but I am not sure. Is there a way to insure that this will occur. I need the field in the line item table because I use it for a relationship elsewhere. Any help is greatly appreciated. Thanks Mike Link to comment Share on other sites More sharing options...
comment Posted November 21, 2008 Share Posted November 21, 2008 A lookup from parent (or through the parent) doesn't work unless the parent is committed. BTW, are you sure you need to duplicate this information in the child table? In most cases, you should be able to establish the relationship either through the parent or by a calculation field. Link to comment Share on other sites More sharing options...
Slobey Posted November 21, 2008 Author Share Posted November 21, 2008 Thanks for the reply, To go deeper, I have a Unit line item table which has region and sesonal pricing. The season is either winter or summer so they have their own fields, but the regions will continue to grow so I needed a line item table for the units. I have a relationship between the Job line item table and the unit line item table. unit code = unit code AND region = region The pricing calc in the line item table says: case( season = "winter"; unit line item:: price winter; season = "Summer"; unit line item:: price summer ) If there is a better way to do this I am more than open to it. Thanks for you help Mike Link to comment Share on other sites More sharing options...
comment Posted November 21, 2008 Share Posted November 21, 2008 The relationship should work fine (for the purposes of getting the correct price) with Region (in the Job line item table) being an unstored calculation field = Jobs::Region This is unrelated to your question, but I believe the price should be looked up, not calculated. Link to comment Share on other sites More sharing options...
Slobey Posted November 21, 2008 Author Share Posted November 21, 2008 Thanks for the help, I don't think a lookup will work for the price. Each record in the unit line item table only has a region, a winter price and a summer price. The relationship finds the region record and the calc is needed to pick which pricing field. As I said before there will never be more than a winter and summer price so I made two fields. Thanks again for the help Mike Link to comment Share on other sites More sharing options...
comment Posted November 21, 2008 Share Posted November 21, 2008 I don't see why a lookup (or an auto-entered calculation, same thing) shouldn't work. If the price is a calculation, it will update when your prices change and ruin your history. Link to comment Share on other sites More sharing options...
Slobey Posted November 21, 2008 Author Share Posted November 21, 2008 I apologize, It is an Auto Calc, not a straight calc. Sorry for the confusion. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5773 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 accountSign in
Already have an account? Sign in here.
Sign In Now