PA52 AGS call doesn't populate "new value" fields

 21 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
I'm modifying a custom ESS form so it will use an AGS call to create a PA52 action. The AGS call gives an "Action Processed" message and adds the action to PA52.1, but the "new value" fields aren't populating. It must be something simple, but I can't figure out what I'm missing. Can anyone give me a clue? I'm attaching several items: - Javascript AGS Call - Fiddler capture of the AGS call - Result Code Thanks for your help!
Attachments
Kelly Meade
J. R. Simplot Company
Boise, ID
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Here is what the PA52.1 record looks like after the AGS call completes.
Attachments
Kelly Meade
J. R. Simplot Company
Boise, ID
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
In the AGS call that I make from Design Studio, I refer to the New valies as PCT-NEW-VALUE-1r1 You seem to have coded it as PCT-NEW-VALUE-11 You may want to try the -1r1..
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Great! Thanks ragu - That solved part of the problem. Now, if I don't set it to immediate, the PA52.1 record correctly shows the new values. However, when I set it to "IMMEDIATE-ACTION=Y" it creates the action on the employee but doesn't actually update the fields...Grrrr. Any thoughts?
Kelly Meade
J. R. Simplot Company
Boise, ID
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
I do not think it is your code. I think that is the way PA52 works. If the action not immedaite, a record is created in PERSACTION, so when yuo inquire you see the new values. If the action is immdeiate, no record is created in PERSACTION, so nothing to view.
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Sorry - I wasn't very clear. For the immediate action, I wasn't looking at the PA52 - I was looking at the HR11 fields that should have updated, as well as the drill to Personnel Actions. The HR11 fields didn't update, and the drill shows that an action was generated, but it doesn't include any field data.
Kelly Meade
J. R. Simplot Company
Boise, ID
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
A shot in the dark: do you have Use WorkFlow set to Y in PA50 for this action ? That would disallow Immediate actions. Which would mean that even though your script rertuns "action processed", it wasn't. Also would mean that the drill-aorund is probably showing an earlier action and not the one that failed.
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Nope - "Use WorkFlow" is set to N. I just realized something - I set it back to not-immediate, re-ran the AGS call, and then I used AddIns to query PERSACTION. It appears that FLD-NBR-1 and FLD-NBR-2 are not populating! No wonder nothing updates. I've tried changing these fields in the call to to the formats PAT-FLD-NBR-1, PAT-FLD-NBR-11, PAT-FLD-NBR-1r0, and PAT-FLD-NBR-1Ar0 and none of these have worked. Any thoughts on this?
Kelly Meade
J. R. Simplot Company
Boise, ID
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
PAT-FLD-NBR-11, frrom what I see in D/S.
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
This AGS call from Design Studio seems to work: var s = portalWnd.AGSPath; s += "?_PDL="; s += portalWnd.oUserProfile.getAttribute("productline"); s += "&_TKN=PA52.1&_EVT=CHG&_LFN=ALL&_RTN=DATA&_TDS=IGNORE&FC=" + vFC; s += "&_HK=" + ZeroFill(vCompany,4) + ZeroFill(vEmployee,9) + vActionCode + vEffDate; s += "&XMIT-HREMP-BLOCK=" + "1111111111"; s += "&PCT-COMPANY=" + vCompany; s += "&PCT-EMPLOYEE=" + vEmployee; s += "&PCT-ACTION-CODE=" + vActionCode; s += "&PCT-EFFECT-DATE=" + vEffDate; s += "&PCT-REASON1=" + vReason1; s += "&PAT-FLD-NBR-11=20"; s += "&PAT-FLD-NBR-12=2093"; s += "&PCT-NEW-VALUE-1r0=" + vNewStatus; s += "&PCT-NEW-VALUE-1r1=" + vNewLOARetDate; s += "&_OUT=XML&_EOT=TRUE";
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Thanks ragu. Unfortunately, No luck. There must be something different with the AGSObject function. I may have to try using the DS style call. It appears that the AGSObject function converts the field names that are passed in to row equivalents, so when I pass in PAT-FLD-NBR-11 it converts it to PAT-FLD-NBR-r10. When I pass in PAT-FLD-NBR-1 it converts to PAT-FLD-NBR-r0. However, neither of these appear to work. Attached is my revised code, a fiddler capture, and the resulting persaction query.
Attachments
Kelly Meade
J. R. Simplot Company
Boise, ID
Karen Ploof
Veteran Member Send Private Message
Posts: 118
Veteran Member
Another shot in the dark... If I'm reading this right, you're using a Personnel Action code called "TOBACCO". When you inquire on that action on PA52.1, is the Status Code the first field and the LOARetDate and second field? I don't do DS AGS calls, but I do lots of PA52.1 add-ins updates and it seems like they're pretty similar in what fields need to be populated
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Hi Karen, The two fields I'm updating are the SMOKER flag (field 124 in our case) and FAMILY TOBACCO USE FLAG (userfield - field 2099 in our case).
Kelly Meade
J. R. Simplot Company
Boise, ID
Karen Ploof
Veteran Member Send Private Message
Posts: 118
Veteran Member
Are they the only two fields on the TOBACCO personnel action?
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Yep - those are the only two fields. Attached is a screen shot.
Attachments
Kelly Meade
J. R. Simplot Company
Boise, ID
Deleted User
New Member Send Private Message
Posts: 0
New Member
Let me start by saying I know NOTHING about setting up ags calls and design studio - but I'm wondering if you have to get past the "inquire" piece of the immediate update on PA52 (similar to using the add-ins)?
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Hi Stephanie, Yep - I'm past that. The call does actually create the PA52 record, and it has the new values in it. Doing an inquire on PA52 makes it look like it is ready-to-go, but if I query PERSACTION and look at the record, the FLD-NBR-x values are blank. If I query the record I inserted and then hit the "change" button (without changing anything on the screen), then the FLD-NBR values populate correctly because the PA52 screen inquires based on the Action. Unfortunately, I can't really do that with a direct AGS call.
Kelly Meade
J. R. Simplot Company
Boise, ID
Deleted User
New Member Send Private Message
Posts: 0
New Member
Sorry I'm no help, Kelly - but the "change" bit has to be done when using the addins to update a personnel action, too. Hope you find your solution!!
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Yay! I solved this one... The issue is that I was setting the "pObj.event" value to "ADD" rather than "CHANGE". If I set it to "CHANGE" and keep "FC=A" in the field list, the field numbers are correctly updated. I was stuck in my thinking that "a record doesn't exist, so I have to add it". UGH!!! This is the type of thing that turns my hair grey. Thanks to Stephanie for giving me the idea to play with this. For those who are interested, attached is my code that finally worked.
Attachments
Kelly Meade
J. R. Simplot Company
Boise, ID
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
By the way, after I figured out this fix, I was able to use either PAT-FLD-NBR-1 and PAT-FLD-NBR-2 OR PAT-FLD-NBR-1Ar0 and PAT-FLD-NBR-1Ar1 to reference the fields.
Kelly Meade
J. R. Simplot Company
Boise, ID
SunPSFoo
New Member Send Private Message
Posts: 1
New Member
Way to go Kelly! Thanks for your post! I had the same problem but I solved mine by changing _EVT=ADD to _EVT=CHG in process flow! Yay!
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Great! I'm glad you were able to get it working.
Kelly Meade
J. R. Simplot Company
Boise, ID