oilman Posted May 13, 2002 Posted May 13, 2002 I have two db's. one has five fields in it. one of this fields is a date field. The other db has has nine fields which four of them are dates fields. This dates in the second db represent the original date each welders was qualify for each welding process. I made a relationship between the two db using the welder name and use the set field command to create a new record in the second db. this works fine for the welders name. Then I use the set field command for the date. this does not work. Example Set Field["rlated:Name","name"] this workd perfectly Set Field["related:Date2",Date"] this doesnot work this is in a script I would like to insert the dates for each process as they are qualify(this may or maynot be a the same time) into the second db. Does set field work like this or I am expecting it to do something that is was not meant to do. Please Help.
stanley Posted May 13, 2002 Posted May 13, 2002 You have to make sure that the field you are setting appears in the layout you are currently using, and that you have allowed yourself access to enter data into that field in that layout. My guess is that the field "rlated:Name" is in your layout, but "related:Date2" is not... -Stanley
oilman Posted May 13, 2002 Author Posted May 13, 2002 Hi Stanleycar: If I understand you correctly that date2 and date3 and date4 has to be in the primary db and I have to enter the data in them for set field to work. Set field will not work in a relationship where in the primary db has one date and you want is to fill out the other dates in another db. example Set Field(case(process="GTAW",Date2=date,process="SMAW",Date3=Date,etc.) is that correct thanks
andygaunt Posted May 13, 2002 Posted May 13, 2002 Hi, Have you tried for your date step Set Field ["related::Date2, TextToDate(Date)"] Now, with set field the field does not have to be on that layout. As long as it exists in one layout you can set a field (even a related field) This is the benefit of set field over copy paste or insert calc result.
BobWeaver Posted May 13, 2002 Posted May 13, 2002 Actually, when you use a Set Field, the field does NOT have to be on the current layout. That is its advantage over Paste, Insert and Clear commands which do require the field to be on the current layout. Most likely, this is a problem with the relationship not being valid.
andygaunt Posted May 13, 2002 Posted May 13, 2002 Bob, I swear I said that set field does not have to be on the layout. OK, I didnt say set field does NOT have to be on the layout. your expression on the NOT is TAKEN IN. Emphasise the negative, got it.
Vaughan Posted May 13, 2002 Posted May 13, 2002 The trick with "Set Field []" is that the calculation specified in the function *must* return data of the same type as the field. The big catch is when trying to set a date range (eg, 1/1/2001...1/1/2002) into a date field for a find request: FMP will reject it for not being a valid date. In this case, use "Insert Calculated Result []" instead, remembering that this function requires that the field be on the current layout.
BobWeaver Posted May 14, 2002 Posted May 14, 2002 Andy, I was correcting Stanley's comment, NOT yours.
stanley Posted May 15, 2002 Posted May 15, 2002 Quite right. My mistake. Sorry for the confusion. -Stanley
Recommended Posts
This topic is 8232 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