cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to clear the message from Expression Box

Former Member
0 Kudos

Hi All,

I am using VC 700.14. We have a requirement in which we get the message after we submit the form. The result of the Submit is stored in another form and in the Layout, we have used Expression box to get the message.Such as Error or Result Succesfull.

And there is one more button to clear the Input fields. Once we clear the Input fileds, the message in the Expression box should also be cleared. But it does not happen.

I have used Pushbutton to lclear the field. The Control Properties for the ClearEntries are: System Action->Delte Row.Apply To->Self.Validation Scope->Element.

Please let me know how to clear this.

Richa

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Richa,

If you want to clear the contents of a form on the push of a button, you can try doing the following. In the Design View, create an output signal(CLRFORM) and assign to it the fields that you want to clear in the form(e.g. the expression view field). Connect the output of the form to this output signal, double click the connection and in the mapping parameters, assign an empty string ('') to the fields you want to clear. Go back to the pushbutton and assign a custom event to it(e.g. CLEARFORM). Assign the CLEARFORM event to the connecting line between the form output and the output signal. Now create an input signal(CLRFORM) by the same name and connect it to the input of the form.

Effectively, what we are doing here is clearing the table through a custom event on the push of the button. You provide the empty strings to the signal output which is inturn makes a call to the signal input and back to the form and thus clears the fields.

The delete row event can be used to clear an entry(row) in a table. Let me know if you need more info.

Hope this helps,

Prathamesh

Edited by: prathamesh dalvi on Aug 20, 2010 10:11 PM

Former Member
0 Kudos

Hi Prathamesh,

Thanks for the reply.

Actually my requirement is that i have to clear fileds which are in two sepatare forms. But i have to clear them through one pushbutton only.

Please suggest any method to do so.

Richa

Former Member
0 Kudos

Hi All,

Please let me know how can this be done.

Richa

Former Member
0 Kudos

Hi Richa,

I have tried that solution using two separate forms and I was able to clear the contents of the form using a single button. What you need to do is the following

1. Create an output signal (FORMSIGNAL) and add all the fields that you want to clear to this signal. You need to add the fields of both the forms to this output signal

2. Associate a custom event to the button with which you want to clear the forms. Name the custom event CLEARFORM.

3. Connect the output of both the forms that you want to clear to the output signal. Associate the CLEARFORM event on both the connecting lines. For the form that does not include the clear button, you will have to search for the CLEARFORM event using the 'other' option in the dropdown and selecting the event scope as 'Any element'.

4. Now click on the connecting lines and assign an empty string ('') to all the fields of the output signal.

5. Create an input signal by the same name (FORMSIGNAL) and connect it to the input of both the forms.

Now when you hit the button, the contents of both forms will be cleared. I have tried this and it works fine. Hope it helps.

Regards,

Prathamesh

Former Member
0 Kudos

Hi Prathamesh,

Your answer was very helpful. I was able to clear the entries of both the forms when i tried it for practice but the requirement in the project is such that Input port of one form is connected to the output of the BAPI. So i cannot connect the Signal In to the input port of that form.

Is there any other option to do that?

Richa

Former Member
0 Kudos

Hi Richa,

As you have Input form, output form and a BAPI in between them you will not be able to connect Signal In to the input form.

So other option is to use a Datastore with a field say "MESSAGE" which would be connected to the output of your BAPI, the field MESSAGE will be populated with your status message when ever you submit the input form.

Now use this Datastore field to populate your expression box in the layout, i.e. the corresponding message will be displayed in the expression box.

As you are already able to clear your input, you can create an action(connect the form in which you have button and the datastore and pass blank value to the field MESSAGE) to clear the MESSAGE field in the Datastore will inturn clear the Expression box.

If your button is in the input form itself, then you need to remove it from the input form and use a new form and make it transparent and create a button in that new form with same properties and place it over input form.

Let me know if you need any clarifications.

Regards,

Rk.

Former Member
0 Kudos

Hi RK,

Thanks for the reply. I have tried it with Data Store but i was not able to get the message in the Data Store.

The SDN thread raised for that is:

So i have used another form in place of Dara Store.

Please let me know if by any means i can clear both the forms. Or is there any alternative to achieve the requirement.

Thanks

Richa

Former Member
0 Kudos

Hi All,

My problem has been solved.

First I assigned a custom action "CLEARFORM" to the button by which i had to clear the entries.

Then i have connected one table to the output of the BAPI.The output of the table is connected to data store.And "select" event was assigned to it.The data store is again connected to the form in which the CLEAR button was present and it was assigned the custom action "clearform".The result field which was to be displayed in expression box was assigned ''(null).

Then i have created one Signal OUT and named it FORMSIGNAL.then i added the fileds which i wanted to clear to that Signal and assigned it ''(null).Then i added one Signal IN with the same name FORMSIGNAL and added those fields which i wanted to clear.

Regards,

Richa

Answers (0)