cancel
Showing results for 
Search instead for 
Did you mean: 

Input parameter in custom BO action

Paul_Ka
Participant
0 Kudos

Hi,

From my understanding there is no way to pass parameters directly to an action of a custom BO but I read somewhere that a transient element can be used as a workaround. Just need a bit more info on how can I implement this.

Let's say there is an Input Field on a QA screen where user can enter some value a button that would trigger a BO action. How do I pass the value from the input filed to the transient element?

Thanks!

Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

There is no need if you are inside the same BO: from the action you can accesso the element where the value is stored simply typing this.elementname

Paul_Ka
Participant
0 Kudos

Thanks Alessandro,

But how do you pass the value from the input box to the transient element if they are not binded?

The reason for no biding is that I need to display something in the input box based o the calculation rule but at the same time give the user an option to change it. If if bind the transient element than I can't use the calculation rule. Unless there is an other way?

Cheers!

Paul

Former Member
0 Kudos

Why don't you use absl or the UI Script instead of a calculation rule (that in addition is not well documented)?

Paul_Ka
Participant
0 Kudos

So how can you access an UI element from the ABSL? And what do you mean by the UI script? I though this is what is referred to as Front-end script?

Former Member
0 Kudos

Hi Paul,

What Alessandro said is that you can use the script this.<BO elementname> in your action or event, say custom Action or Aftermodify event;

Or you can use the Ruby script(a kind of frontend script) which start with "$", i.e: $data.<blabla>;

Of course you need pass the value of data field which created in Data model to your BO element if you want it be used in BO script.

Hope this can clarify your questions.

BR,

Qiang

Paul_Ka
Participant
0 Kudos

Hi Qiang,

Thanks for the input, I know i can access the element using the this.<BO elem> but the problem is that the element is not binded to the UI input box this no data is passed from the UI input box to the BO element

Also the $data requires the UI element to be binded to  something in the data model. Otherwise it can't be accessed in the frond end script.

Let say there is a input box on the UI screen and the value property is set to calculation rule in order to pre-fill the text for the user.  But i want the user to have the ability to modify the text and pass this text to the transient element.

So basically the  question is can the UI input box be access by the front end script with out being binded in the data model?

Thanks!