Page 1 of 1

How to setvalue a field component in Web page

Posted: Thu Dec 15, 2016 2:51 pm
by Taku Izumi
Hi,

In Form application, the following code is valid in order to set a value to a field component.

For Each(#Item) In(#Panel1.ComponentControls) Operation(*INSTANCE_OF #Prim_evef)
#ITEM.SetValue Value(*NULL)
Endfor


On the other hand, this code is invalid in Web page because the setvalue method is not allowed.

Is there a similar code which can use in Web page?

Regards,
Taku

Re: How to setvalue a field component in Web page

Posted: Thu Dec 15, 2016 3:20 pm
by dannyoorburg
Hi Taku,

the generic SetValue is indeed not (yet) implemented on the Web.

That leaves you with

- either specifically naming the input fields you'd like to clear (I usually do it through a Group_By)

Code: Select all

Group_By Name(#InputFields) Fields(#STD_TEXT #STD_NUM)

Evtroutine Handling(#Button_ClearAll.Click)

#InputFields := *NULL

Endroutine
- or else, if you MUST go generic (I'd be interested to know why if you do), you could always re-instantiate the whole panel/reusable part, but that seems to me a bit of a sledge hammer approach.

Regards,
Danny

Re: How to setvalue a field component in Web page

Posted: Thu Dec 15, 2016 5:13 pm
by Taku Izumi
Hi Danny,

Thank you for your reply.

Group_by is a simple approach.

I will use that.

Regards,
Taku