Easy to Create, Easy to Change - Easy to use!


How to show/hid a button based on all fields filled?


Started by Charmaine
Search
You will need to Sign In to be able to add or comment on the forum!

How to show/hid a button based on all fields filled?

I'm a bit stuck, I want to hide a print button in Dataease 8 until all the fields are filled ?

Written by Charmaine 12/02/14 at 09:29:42 Dataease [{8}]FIVE

Re:How to show/hid a button based on all fields filled?

Download Sample

There is plenty of ways to do this, but none of them are a ?one-click-shop?.


I guess the question here is how many fields are we talking about.

if it is few fields you can simply make a virtual field that does it.

if (field1 not=blank and field2 not=blank and field3 not=blank, SetState(?MySaveButton?,1),SetState(?MySaveButton?),0)+SetState(?ThisField?,0)

The last SetState is to hide the virtual field itself.

This will only work up to a limited number of fields as there is limits to how long the derivation can be (255).

You can of course make many virtual fields that work together..

The second alternative is to use an OML script that check if the fields has value. You can use the HasValue property, but why re-invent the wheel? Not blank is good old DataEase style ;-)

The ?drawback? with this method is that it is called every time you move the mouse, but to be honest today that is not much of a problem if at all?.

Username/Pw: user/user and High/High

Written by DataEase 12/02/14 at 12:36:57 Dataease [{8}]FIVE