cancel
Showing results for 
Search instead for 
Did you mean: 

loop/restart a component

Former Member
0 Kudos

Hello,

I have a form to input and persist data.

After each entry, i want to redisplay the empty form to start a new entry.

A connection from end point back to a start point does not work.

Any hint?

Thanks,

Kai

Accepted Solutions (1)

Accepted Solutions (1)

ThatSAPGuy
Advisor
Advisor
0 Kudos

Hi Kai,

If I understand correctly you have a service and the input for which is a form. On the submit button you execute this service. Are you changing the screen? I am assuming not. So essentially you want to clear the form after the submit button. Here is how you do it:

1. Go to your Layout editor

2. Right-Click on the Submit button and choose Actions

3. There should be a SUBMIT action by default, add another pre-defined action called CLEAR and apply it to your input form. The execution mode should be Sequence

4. Save your model and deploy it.

Good Luck.

Atul

Former Member
0 Kudos

Thanks Atul,

how would i "change" the screen to fully reinitialize the component?

I only found transition which requires you to create a totally new component....

Thanks,

Kai

ThatSAPGuy
Advisor
Advisor
0 Kudos

Hi Kai,

I'm not quite sure if I understand your requirement clearly.

You do not have to change the screen if you are going to display the same form.

Cheers-

Atul

Former Member
0 Kudos

but what if i have 3 forms, one after each other, some complex validation and so on.

i want to reinitialize the whole component if hitting the end point á la

START -> step1 -> step2 -> step3 -> END -> START (restart)

thanks a lot,

kai

Former Member
0 Kudos

It seems you need to connect step3 back to step 1.

Did you try this?

ThatSAPGuy
Advisor
Advisor
0 Kudos

Have a button on your last step called Finish. Then have a navigation from the last step to the first step which you trigger based on the new action. In the list of actions include the clear action as I had described in my earlier post.

Cheers-

Atul

Former Member
0 Kudos

Thanks alot, will try your hints tomorrow!

ThatSAPGuy
Advisor
Advisor
0 Kudos

Hi Kai,

Were you able to get the loop to work?

Regards,

Atul

Former Member
0 Kudos

I tried but with not success

simple example:

START -> input form -> web-service to persist -> END

it is not possible to create a connection from the web-service-end back to input-form-start, as input-form-start is already connected to start.

any further hints?

thanks,

kai

ThatSAPGuy
Advisor
Advisor
0 Kudos

Hi Kai,

You do not have to have a transition back to the input form itself. Use a Wizard UI element. Have a look at this model:

[Currency Conversion Model|http://img84.imageshack.us/img84/8823/vcloopxg9.png]

Here the input form is pre-populated using the Start element. Then on submit the web service is executed and the results displayed. The results are displayed in a form which has a "Back" button associated with an action. On this action there is a transition to the first "step" of the wizard and not to the input form. I hope this helps.

Cheers-

Atul

Former Member
0 Kudos

indeed, that helps alot!

will try this monday and give you a whole bunch of points

thanks,

kai

Former Member
0 Kudos

Hi Kay

another way to do this is to use the switch operator.

The switch operator enables you to map fields from several output ports into a single input port.

[Here is an example of how the model will look like|http://img444.imageshack.us/img444/1768/restartmodelke0.png]

[and this is how the Switch operator configuration looks like|http://img444.imageshack.us/img444/6967/configureswitchqu9.png]

In order to configure the switch operator you have to click it and select "Configure Operator".

I hope this helps,

Shai

Former Member
0 Kudos

thanks all !

im using shai's switch-concept although it requires me to CLEAR all forms manually instead of properly "restarting" the component. whatever, it works.

thanks,

kai

Former Member
0 Kudos

Hi Kai

Although this question is answered, I came by another nice solution to this problem.

In order to restart a component you can use a Navigate connector that points to the model. What you need to do is to search for your model within VC models, drag it onto the board and add it as a "Navigate to" connector.

Regards,

Shai

Former Member
0 Kudos

very interesting indeed, shai. thanks for your comment!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kai,

Can you please attach a screenshot of your model?

Regards,

Shai