Refreshing values on form


#1

Hi,

Me again :roll_eyes: I have a form with multiple lookups in it. When I open the form I have to TAB through all the fields to see the lookuped values form the lookup next to them. The ThisWindow.Reset(1) doesn’t work on this. Is there a way to do this?

Thanks!


#2

Does DISPLAY help? You wouldn’t want to call DISPLAY of the whole window on a frequent basis, but maybe that’s what you need to display those values.


#3

Hi,

No it shows only the items from the previous browse window. Adding the needed fields into the browse causes double records in to the browse because of the relationships between the files. Adding a second filter doesnt work


#4

Sounds like the previous window is the current target when you’re doing a refresh. Is your window opened yet when you call your code?


#5

If you use the control template and configure on the entry box to refresh after lookup that should work though.You can also configure for other fields to be updated. It may be worth checking that you have configured up both the button and related entry control correctly.

As the reset method only updates registered items, you will have to provide code to update other elements. For non-template lookups I sometimes add the DISPLAY(?A,?Z) line in the ThisWindow.Reset embed point so they get refreshed when the ABC items do, if an ABC refresh for registered items like a browse list is going to happen anyway. It is a good place for any secondary lookup or colour/font changes on value etc. too. If you don’t have any registered items you could still use that embed and call it.

I hope this helps, regards Jim


#6

Hi Jos,

Try to end the take accepted with thiswindow.reset(1)
and at ThisWindow.Reset after [Priority 4000] ie (where loc:dm is the
value to lookup)

CASE rel:Dhr_Mw
of ‘D’
loc:dm=‘hr.’
of ‘M’
loc:dm=‘w.’
else
loc:dm=’’
END
display(?loc:dm)


#7

Hi,

Final fixed it by adding the fields in to the browse and adjusting the relationship between the files.

Thanks all for replying!