cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic parameters in workflow

Former Member
0 Kudos

hello,

We are building a workflow app.

In that, we need to pop up parameter value from one screen to another.

The problem we are facing is, it works just fine for a single parameter. But when we do the same for two parameters, it pops up only last field value.

As both the parameters are pointing to the same screen. So maybe it refreshes the screen each time, when we try to put the values.

How can we edit the custom.js file for the same.

Please advise.

Thanks n regards

Ajay

Accepted Solutions (1)

Accepted Solutions (1)

david_brandow
Contributor
0 Kudos

I'd agree with Midhun, there isn't sufficient information provided to understand the scenario or what specific problem you are having.

Former Member
0 Kudos

hello Midhun & David,

Sorry for that, was in hurry yesterday.

The scenario is:

     We have two MBOs, which we are attaching to two different menu items.

     The task of menu item is to search the parameter value by its name.

     And we need to populate these both values of parameters in same screen.

     So when we click on one menu item, the parameter value populated by another menu item in      same screen disappears, as second menu item refreshes the screen while populating value.

    

Please advise on same.

Regards

Ajay   

Former Member
0 Kudos

This message was moderated.

david_brandow
Contributor
0 Kudos

Are the keys the same for those parameter values, or are they different?

What do those menuitems do?  Do they execute online requests?  If so, do those online requests stay on the same screen, or do they open new screens when the data returns successfully?

In general, online requests don't behave the way you describe.  When the data comes back in processDataMessage/processWorkflowMessage, it construct a new WorkflowMessage out of the incoming data and then merge it with the existing workflow message.  It merges, it doesn't replace.  If the two messages contain the same keys, however, then one value will replace the other, that's unavoidable.

The other behaviour you should be aware of is that the changes you make on the screen don't get applied to the workflow message until the screen is saved.  So if you have changes on the UI that haven't been applied to the workflow message, then subsequently update the workflow message (either directly, or indirectly by invoking an online request), and then subsequently update the UI from the workflow message (either directly, or indirectly by invoking an online request).  When you invoke an online request, however, it first saves the screen, so that shouldn't be the issue if your menuitems are invoking online requests in the traditional way.

Former Member
0 Kudos

hello David,

1) There are two different keys for two parameters.

2) Both menu items OPEN the same(next) screen when data returns successfully.

Do i need to use Online Request for this??

Regards

Ajay

Former Member
0 Kudos

hello David,

Menu item uses OPEN type, to navigate to next screen.

how can i save the screen after populating parameter value by one menu item??

So that, another menu item will point that same (but Saved) screen.

Is it possible by editing custom.js??

Please Advise.

Regards

Ajay

david_brandow
Contributor
0 Kudos

That answer puzzles me. If the data is returning, then you are presumably already using an online request, are you not?

Former Member
0 Kudos

hello David,

In simple words:

We have a start screen, where we have two parameter edit boxes.

We have two menu items on another screen, having these parameter values, to be populated in this start screen, at respective parameter edit boxes.

Now, as both menu items navigate to same screen, using open type, the start screen doesn't get saved after any of menu item action.

So, when we do click two menu items, one after another, the value populated by previous menu item disappears, as the next menu item to it, opens fresh start screen.

Can we save the start screen as per, to populate both the values accordingly???

Regards

Ajay

david_brandow
Contributor
0 Kudos

Gotcha, I'm with you now.

Yes, that should be pretty simple.  In customBeforeMenuItemClick or customBeforeShowScreen or customBeforeNavigateForward, call saveScreen.  You could also set the value of the HTML elements to be the same, either approach would work.

Former Member
0 Kudos

Thank u David,

Just let me try this, I'll let you know.

Regards

Ajay

Former Member
0 Kudos

Thank you David.

That was quite easy.

Regards

Ajay

Answers (2)

Answers (2)

midhun_vp
Active Contributor
0 Kudos

I don't understand your question. Can you please give complete information on what you did and wha you are trying to do, if possible with screen shots.

- Midhun VP

Former Member
0 Kudos

hello,

Very sorry for insufficient info.

We are using two different menu items for two parameters.

Regards

Ajay