cancel
Showing results for 
Search instead for 
Did you mean: 

Clear Inputfield

Former Member
0 Kudos

Hi,

How to clear a inputfield when a button is pressed, should i use custom action for that.

Can you provide any examples for custom actions.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sdn sap,

you can choose a custom action, which will reset the inputfields.

For example the custom action called reset, will pass new values for the inputfield,

tha values are an empty string ''.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Marcel,

I´m new at the VC and have the same Problem to clear the Inputfield. Could you explain it again for me? Í don´t get it like you say to make an customer action, because there is an system action for the button. Or is it possible to have two action for one button? And if yes, how do I make this?

regards

Marcus

former_member193545
Active Participant
0 Kudos

Hi

You can not have 2 actions for the same button. To clear a form you can use a signal out and signal in when you click on the submit button you can fire the signal out which will inturn fire the signal in connected to the input of the form.

Jarrod

Former Member
0 Kudos

Thanks, but I guess I don´t get it. I have two snerarios where I had to do two action. First I have a popup iView as Input Field. When submit the data, the popup should be closed. Same thing with the issue to clear the Input. I have an inputform to search for a BUPA and the result is shown in a table. When click on the search Button, the Input Field should be cleared.

I havn´t work with the signal in and signal out, so I don´t know how to use.

Former Member
0 Kudos

Hi Marcus,

for the popup you can use a further button, which will unhide when the data was submitted.

This button gets the windows close system action.

I havn´t work with the signal in and signal out, so I

don´t know how to use.

Then it's time to try it out.

There are a lot of how-to's here in SDN.

<a href="http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a7fbe">Visual Composer Modeler's Guide</a>

and the

<a href="http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9326072e-0c01-0010-bc97-f72e93338101">Visual Composer Reference Guide</a>

Learning by doing is the best way I think.

Best Regards,

Marcel

Former Member
0 Kudos

Marcel,

<<For example the custom action called reset, will pass new values for the inputfield>>

Tell us more about this custom action! I haven't seen it in the docs and I tried creating a pushbutton with a custom action value of RESET and it didn't seem to work. I'm sure myself and others would find this info useful.

For the original poster and others, I have found that you can get the reset functionality you're probably looking for by creating a button (or whatever) and have its action be the System action -> Insert row and select the radio button option "Insert first." That seems to work.

The only catch is that if you have a field that defaults to a STORE variable and that value has changed since the form was built, the insert before action doesn't update the form field with the new STORE value.

Jarrod,

Not to hijack the thread but are scriptable actions a forthcoming feature? It seems like there are multiple folks in this forum who have such a need (including myself).

Thanks.

Former Member
0 Kudos

hi Marcel, Where I define the code for the reset buttom ?????

Former Member
0 Kudos

hi efrain,

I don't know for which application do you need this requirement. For example you want to reset a form you can add another form which has a button. This form should connected with the other and the button should use a custom action. Then assign a empty string as value for your fields, then they are resetted.

You always should use an action for ressting forms.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Marcel

I need your help..

the application is a client selection form...Im using a botton named reset in this form... my question is ... where I assign the empty string value for the fields??.. I just create the bottom reset like a custom ( custom action = reset

apply to = Self

action code = cmd(reset) )

action. but i dont see clearly where put the code or where define cmd(reset).

thanxs.

Former Member
0 Kudos

Hi efrain,

you can add a second form below or above your form, then add a button, with a custom action. Then you connect the second form with the first and assign each input field an empty string ''. That must work.

A colleague did it with the first variante of the wiki and it also worked fine. I had another reset requirement with a poup and I did it with empty strings in the popup input parameters.

Best Regards,

marcel

Answers (1)

Answers (1)

Former Member
0 Kudos