cancel
Showing results for 
Search instead for 
Did you mean: 

Read data on click of a button

Former Member
0 Kudos

Dear Experts,

i have a critical requirement where in i need to default some text in the form on clicking a button on the form.

I have created an ISR button on the form and created a new backend generic service to default the text on the form. The generic service works fine.

Now when i click the button on the form, my generic service is getting called and at the same when i click "Check and send" button the same generic service gets called.

So i now want to check inside my generic service, when my button is getting called and when "Check and send" gets called so that i can restrict my piece of code from getting executed for check and send alone.

Is there a way? Appreciate your help.

thanks,

regards,

sridharan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Cris,

I am not so new to HCMp&F, but just that i havent worked on this scenario for reading the data on click of a button. I am working on the requisition form and there are already a few ISR buttons on the form to get the pop up for positions and brach details.

I'am just trying to understand the deeper concept of how the scripting works and how to control the request from an ISR button on the form.

Can you share some thought how can creating a RULE solve this issue. Thanks.

Regards,

Sridharan

Former Member
0 Kudos

Hi there,

Sounds like Solomon believes rules are the answer here. Unfortunately, rules wouldn't work unless you start creating flags to execute them on. Wacky design if you ask me for such a simple task haha

May I recommend you look into a user event to handle this problem. It's exactly what they were built for. User events are similar to check events yet it allows you to select what fields you want to process. In this case, you'd create a user event to process only this field (along with some other special fields, if needed).

You will have to modify the javascript on your Adobe form button to call the user event. Simply specify the user event name in the ISR_EVENT paramter. I believe the SAP delivered requisition form has a sample of this? Pretty straight forward stuff.

Good luck

Andy

Edited by: Andrew.Fletcher on Oct 9, 2010 1:05 AM

ChrisSolomon
Active Contributor
0 Kudos

@Andy

I think you misunderstood my response. Setting up user event(s) is a given. Past that, he wanted to have some control on those....which naturally leads to Rules configuration. Past that, it comes down to some startegies to make "user events" actually behave as we would like them too. Actually, unless you have implemented the most recent of recent notes/patches, yes, that "wacky way" is how you used to HAVE to handle user events if you really wanted only certain fields/services called....and even then, it is still needed in many cases. The whole "user event" mechanism for HCM P&F is crap in my opinion and needs reworking. Aside from that though, RULES are also very useful in conjunction with user events, and yes, you may STILL need to use that trickery of "event flag" fields to make it all work out correctly.

And keep in mind, you can have rules at both the SERVICE and OPERATION levels, so make sure you know what you need and when to use it.

Former Member
0 Kudos

@Solomon

Hi! I don't think I misunderstood your response. Setting up User Events is not a given, especially for some users who are getting started with HCM PF (Note how he's never returned data on a button click? Dead give away, IMO). So detailing that option would have probably been helpful to avoid all the mapping, field additions, javascript, etc. that comes w/ rules and flag fields. Also, User events aren't CRAP, haha, they have their purpose and can serve it well so long as the process is designed correctly.

I'm well aware of rules and how they are used, but for the scenario in question I'm not so sure that would be the correct approach. It's like using a grenade to rid yourself of an anthill when a simpler solution might suffice... I guess the initiator of this post would have to make that determination. Of course, though, he would need to be better informed.

It is for this reason I responded to this post. Lets keep our people informed!

Cheers mates

ChrisSolomon
Active Contributor
0 Kudos

Seriously?!?!! So you have learned just enough about HCM Processes and Forms to be dangerous eh?

Learn about RULES. That will solve that problem for you.