Updating form data upon leaving a field

Now that my transparency issues have been resolved, I am on to my next stumbling block!
I have a method that tests the contents of a detail record field to determine if it is blank or null in order to set the field transparent or not (see previous topic: Transparent Entry fields). Each field on the form has a method that does the testing similar to the following:

// test for data in fields

if(forms.name.nameaddress1)
{
elements.nameaddress1.transparent=false;
}
else
{
elements.nameaddress1.transparent=true;
}
application.updateUI()

When I display the form initially I have a wrapper method that calls a method for each of the fields on the form and everything works great.
What I want to do now is to re-test the value of the field as the user leaves it and re-set the transparency property appropriately. In other words, if the user entered data in the nameaddress1 field, the transparent property should be false.
I re-execute the method for each field in the onLeave property for each field, but as I leave the field, nothing has changed. The property is not re-set until I exit the record, go back to the list form and re-load the detail form.
At first I thought I needed to refresh the User Interface, but that does not seem to work. Any ideas?

Send me your solution. I’ll have a look at it.

You shouldn’t excute that method on onLeave but you should use onChange.

Send me your solution. I’ll have a look at it.

I have included my solution for maarten.

I tried onChange event, still does not work for me.
The solution will open in Namelist form, clicking on a line should bring up the coresponding record’s name form in dialog mode. Other buggy behaviours are the following:
1.) if i click on some areas of the name dialog, the dialog is dismissed. I want to make sure that the dialog will not be dismissed until/unless the user clicks on the close button (X box).
2.) if I click on a line I have just visited, nothing happens (I want to re-launch the name dialog for the record again), but then if I click on another record, the name dialog will display as expected, but once that form is dismissed, no other selections are possible! :? :?
3.) The lastName,FirstName,Middle name field on the namelist form is a stored calculation that concatenates first, last and middle names. When I return from the name form dialog, the calculated field is not updated. How do I update this field on the namelist form?

here an answer for all your problems, except for closing the form, when you click between the two portals. That’s indeed a bug, an need to be looked at by the dev-team.

Point 3. You used a calculation field with capital-letters.
I have brought this back to the original field name. now this field is updating right away!
see example.

Thanks! That was quick!
But when I import, i get the following:

which version of Servoy are you using?

I tried it, and imported it in 1.2 RC5.

I’m using R2 1.1. I tried to upgrade to RC5 but have been unsuccessful. After performing the install I get the attached error message.

Thank you, HJK, for your thoughtful help in de-bugging my solution but because I am clawing and scratching my way up the learning curve, it would be very helpful if you could tell me what you had done to resolve my problems. If you would, I’d probably not feel so helpless :wink:

Try to do a clean install! than it will work

Did you see my solution now?
What I did, is placing a unvisible (transparant) button over the row.
At this button I attached the method that pops-up the form.

And I deleted the onRecordSelection. etc.
and I made a new method (attached on the property: onNewRecord) that makes a new record an than pops-up the form!

Hope this helps

Wonderful! :D Thanks so much. It’s funny, I use transparent buttons in FilMaker all the time! I never thought of using them here, I just assumed that the normal Form events had to be used.
Can you tell me why the individual fields tested onChange did not work before and now they work fine? I don’t believe you made any changes to the code.
Also, origional dialog was displayed in the center of the screen using the default -1 parameters for positioning. Now the dialog is displayed at the top left, although the default parameters are still used.

IN 1.2 RC5 are some adjustments what solved that problem!

for use of pop-up form, dont use

application.showFormInDialog( forms.name, [-1], [-1], [-1], [-1]);

but

application.showFormInDialog( forms.name, -1, -1, -1, -1);

this will solve your problem.

Thanks again!