Who's Online Now
0 registered members (), 6 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
clickavi, wilts, Renuka, KavyaMurthy, Del
1280 Registered Users
Recent Posts
Update employee spinal point via API
by Andrew. 19/02/19 05:13 PM
CT's Handy Hints for Migrating Balances
by CT. 05/02/19 07:41 PM
Run Results from a UDF in a Fast Formula
by paulgos. 21/01/19 01:44 PM
Top Posters(30 Days)
Andrew 6
CT 5
delboy 1
Neo 1
Popular Topics(Views)
475,436 PAYE RTI
56,256 HR_PF.K RUP4
Previous Thread
Next Thread
Print Thread
Rate This Thread
#12184 - 19/01/19 10:28 AM Run Results from a UDF in a Fast Formula  
Joined: May 2009
Posts: 12
JNA Offline
newbie
JNA  Offline
newbie

Joined: May 2009
Posts: 12
Gloucestershire
Dear Payroll Experts,

I have two elements A and B both present in the same payroll run.
Using a UDF in the fast formula attached to element B I wish to retrieve the pay value of certain (not all) instances of element A.
Using the processing priority I ensured that element A is processed before element B. This is confirmed by retrieving the _ASG_RUN value of a balance fed by A. However, this balance includes all instances of element A but I am only interested in some. In the UDF I execute a query on pay_assignment_actions, pay_run_results, etc but get no results for element A. How can I get the pay value for element A when processing element B?

Any help would be greatly appreciated.

Regards,
John.

#12185 - 19/01/19 08:34 PM Re: Run Results from a UDF in a Fast Formula [Re: JNA]  
Joined: Mar 2005
Posts: 436
paulgos Offline
battle-hardened campaigner
paulgos  Offline
battle-hardened campaigner
****

Joined: Mar 2005
Posts: 436
Gosport
Hi John,

If I was you I would use element A to work out which results you what and feed theses only out to indirect element. So for example I will call this element A1. A1 will be the results you to use in Element B by feeding A1 results to a balance and use this balance in a formula within Element B. Element B can select the balance and the balance dimension of Element A1 to do what every you need. The results you don't want to you use in Element A you can still feed out of Element A but use to feed a balance you don't need to use and store just for reference.

Your function will not pick up the Run Results during the run because the are not stored on the data base until the full Payroll run is completed.

Hope this is clear, but if you need a better explanation just shout :-)

Cheers



Paul

#12186 - 21/01/19 12:14 PM Re: Run Results from a UDF in a Fast Formula [Re: paulgos]  
Joined: May 2009
Posts: 12
JNA Offline
newbie
JNA  Offline
newbie

Joined: May 2009
Posts: 12
Gloucestershire
Hi Paul,

Grateful for your reply. I uderstand what you say. What I did not make clear is the fact that the instances of element A that count are determined by element B. That is elements A and B both have a date input value. The instances of A that count are those with a date that falls withing a reference period. This reference period is determind by the date input value in element B. So, it is only when processing B that you determine which instances of A are required.

Thanks also for confirming the situation with Run Results, so I will not bother investigating that further.

Regards,
John.

#12187 - 21/01/19 01:44 PM Re: Run Results from a UDF in a Fast Formula [Re: JNA]  
Joined: Mar 2005
Posts: 436
paulgos Offline
battle-hardened campaigner
paulgos  Offline
battle-hardened campaigner
****

Joined: Mar 2005
Posts: 436
Gosport
Hi John,

You obviously can't go from element B back to A, so i can understand your issue, and also the reason for a function to get the run result values from A but as mentioned, until the payroll is finished you can't retrive the results.

From what I can make out from your reply, I would have element A, with date input values and within a formula convert the dates into numbers, like EXCEL does, using this condition;

(days_between(period_start, to_date('30-DEC-1899','DD-MON-YYYY'))

period_start being the input value holding your date.

I would then feed this value indirectly to element B in a input value of type as number. I would also feed the Pay Value of Element A to a balance for element B to picked up if the converted date is between your two dates.

In your formula for element B I would do a check to say if the converted date (now a number) passed into an input value in element B is between the converted dates in Element B that you need to do your comparison on, then get the balance holding Pay Value from Element A and do the magic you are trying to achieve.

The part of the condition you must always use is this bit, to_date('30-DEC-1899','DD-MON-YYYY') as this is the start of time when it comes to converting dates into what ever format EXCEL uses. The period_start is the alias name for pay_proc_period_start_date within my original formula. The days_between is an obvious function.

You can PM me if I am still not making myself clear.

Thanks


Paul


Moderated by  CT, delboy 

Forum Statistics
Forums60
Topics2,217
Posts11,977
Members1,281
Most Online90
Mar 5th, 2017
Today's Birthdays
No Birthdays
Recent vacancies
Top Posters(All Time)
CT 2,097
delboy 1,291
bcooper 1,291
paulgos 436
SBi 426
pat 254
Gus 252
vkumar 223
February
S M T W T F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.023s Queries: 15 (0.005s) Memory: 2.7549 MB (Peak: 2.9083 MB) Zlib disabled. Server Time: 2019-02-20 17:12:59 UTC