File loaded Drop Combo

I have a “File loaded Drop Combo” which fills the form with the contact person’s name, phone number and e-mail address. The problem is that I only want to change the phone number and e-mail address if the target fields are empty or if the contact person’s name is changed.
I can’t find any place to write code to do this check.


Have you tried searching the embeditor code for the variable name(s) in question? Perhaps you can find the assignments and surround them with a conditional statement.

The only place where I can find references to the variables (Con:PhoneNo and Con:Email) is in “ThisWindow.Init PROCEDURE”, but I cannot find any way to surround them without surrounding the hole “! Process field templates”.

ConPersQ.AddField(Con:PhoneNo,ConPersQ.Q.Con:PhoneNo) !List box control field - type derived from field
ConPersQ.AddField(Con:email,ConPersQ.Q.Con:email) !Browse hot field - type derived from field

On the other hand, I do not think this is the right place to make a conditional statement, but I cannot find the variables Con:PhoneNo and Con:Email anywhere else in the source.

Hi Trond - I didn’t get an email notice about your reply. Sorry for the delay.

Looking at abdrops.clw, the assignment happens within several different methods and there’s not really a single place to put conditional code in the proper location. If you search for SELF.UpdateFields.AssignLeftToRight in abdrops.clw, you can see what I mean. There are several occurrences :-\

I wonder if it would be the least disruptive to create LOCAL variables to assign the values, and call a ROUTINE that does the actual assignment based on your conditions.

Then call your ROUTINE after the PARENT call in the following methods:


Still a PITB, but it’s doable.

AssignLeftToRight is also called in the SetQueueRecord method, but I don’t think you’d necessarily need it there.

If I understand correctly, there should be a button on the drop-combo actions that says “More Field Assignments”. Your other fields should be listed there, or add something new for testing. If you search the source for one of those fields, you should find the derived method that you can put embed code in… I think.


Thank you Jeff.

I set up some conditions in the TakeNewSelection() and assigned local variables to the con: variables and it looks like it solved the problem.

The problem was that I wanted “More Field Assignments” only when the target fields where empty, and that I could not find where to do the check. But after “PARENT.TakeNewSelection(Field)” in “TakeNewSelection PROCEDURE(SIGNED Field)” I could set up some conditions and assign values when I wanted. Thanks.


The filedrop class uses the fieldpairsclass to do the assignments. There are no virtual methods to intercept it in one single place. The AssignLeftToRight is used directly in several places.

Interesting, thanks. But it looks like he found a way…

Hi Jeff

I will not argue with you. You know this stuff much better than I do. However, as far as I can see, the check in TakeNewSelection does the trick.

Thank you for your effort.

I was telling Carl :). Your solution is not at cross ways with my suggestion.