best way to do this. using a field in a group or directly?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

best way to do this. using a field in a group or directly?

Post by Jaymer »

examine this code

Code: Select all

POLines.QtyRecv=POLines.Qty 
POLines.DateRecv=CURRENT_DATE
POLines.DateRecvWho=LoggedInCustSvcUsers.Name
this is from a process thats going to timestamp a PO line when it is received.

Now lets say I have several BOs that make up my SystemUser GROUP.
SalesUsers
ExternalUsers
CustSvcUsers
RegularUser (by default, although I may not have any data in here)

When I'm typing in the Rule, if I hit F5, Aware will enter: LoggedInSystemUser (which would refer to the Group). I have manually changed it to CustSvcUsers because I know that ExternalUsers and SalesUsers NEVER can touch the acct system (POs).

DO YOU THINK there is a performance penalty if I write the 3rd line as:
POLines.DateRecvWho=LoggedInSystemUsers.Name, or better performance by changing (as I did above) to
POLines.DateRecvWho=LoggedInCustSvcUsers.Name
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: best way to do this. using a field in a group or direct

Post by PointsWell »

Jaymer wrote:DO YOU THINK there is a performance penalty if I write the 3rd line as:
POLines.DateRecvWho=LoggedInSystemUsers.Name, or better performance by changing (as I did above) to
POLines.DateRecvWho=LoggedInCustSvcUsers.Name
I can't speak to the performance issues but from a code maintainability point of view I keep references to the LoggedIn User BO specific. When I am reviewing my code later the slightest inconsistency can throw me off. Why did I change it? Why was I specific before and not now... etc. If I am ever lucky enough to sell off the IP of a product then I'd imagine that would also be a question. But your mileage may differ and it doesn't answer your performance issue.
Post Reply