AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Dashboard...
Setting Bar Graph w...
 
Notifications
Clear all

Questions Setting Bar Graph widget populated from GI parameters (for current logged in user branchID)

 
Acumatica Dashboards
Last Post by JPvdG 5 years ago
9 Posts
4 Users
4 Reactions
3,896 Views
RSS
Posts: 11
 Christopher van Heerden
Topic starter
October 8, 2018 1:17 pm
(@christopher-van-heerden)
Member
Joined: 7 years ago

Hello you guys.

The scenario I have is the following:

ย  ย  ย  ย  1] I have a Sales Order Generic Inquiry.

ย  ย  ย  ย 2] I have a dashboard with a bar-graph widget that shows total invoiced sales order values per month. This widget shows the information for all branches in ourย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  company.

Management wants me to add the functionality to the widget/dashboard to only show invoiced sales orders that belong to the current branch the user is logged into.

I have done plenty of research but the best option I saw was to use AccessInfo.BranchID = SOrder.BranchID. Sadly see that this is a virtual table and not accessible via GI parameters nor conditions or filters( Invalid Object error) Of course this table does not exist in the DB.

I see that the current branchID variable is kept in the session cookie though but am not sure how to use this value in my GI.

Is there a way I can show/extract data for the GI for the current user logged in branch only please?

We use Acumatica 2017 R2.

Kindest regards,

Christopherย ย 


8 Replies
Posts: 11
 Christopher van Heerden
Topic starter
October 22, 2018 3:46 am
(@christopher-van-heerden)
Member
Joined: 7 years ago

Good morning everyone.

ย 

So; this cost a lot of learning; but in the end I ditched trying to use AccessInfo to try and filter data per logged in users company/branch.

ย 

What I did in the end was to leave the single generic inquiry and I added shared filters for the multiple branches.

I then created a single Dashboard and added multiple bar graph widgets for each company and I set "Allow users to Personalize" to true.

The effect:

All users from different companies could view the single dashboard - Acumatica of course automatically restricts data not belonging to the users so the users not belonging to certain companies/branches saw empty widgets.

Because I set "Allow users to Personalize" to true; the users could delete/remove the "empty" widgets from their dashboard and all looks gret.

Even if the user from one branch tries to change the widget shared GI filter the system will still not populate date for that user because the user belongs to the incorrect role.

We linked our branches to roles.

ย 

Kind regards,

Christopher


Reply
JPvdG
 JPvdG
(@jpvdg)
Joined: 5 years ago

Active Member
Posts: 12
August 22, 2020 10:58 am
Reply toChristopher van Heerden

@christopher-van-heerden

Thanks for the above - and glad you found a solution. 

Would it be possible to share the Generic Inquiry setup, as  well as the Dashboard setups that you achieved. Im looking for exactly the same dashboard.

Bar Char - per Branch - showing monthly accumulated Sales.


Reply
Tim Rodman reacted
Ellie
Posts: 129
 Ellie
October 24, 2018 3:02 pm
(@ellie)
Estimable Member
Joined: 6 years ago

Great solution for your case.

Has anyone actually been successful with the original request- get the current user to be recognized as a condition in the GI?

We have some GI's that would use distinct parameters based on user.

Example: A Sales Generic inquiry.

For performance purposes, when the typical user runs the GI you would want to limit the start date to a fairly recent date and let the user extend if needed. But if the GI is being accessed via Odata automatically, you might want all sales from beginning of time.

I can't think of a way to achieve that without the GI knowing the User ID.


Reply
Christopher van Heerden reacted
 Christopher van Heerden
(@christopher-van-heerden)
Joined: 7 years ago

Member
Posts: 11
October 26, 2018 11:23 am
Reply toEllieEllie

Hey Ellie.

ย 

I have not personally tried implementing this but try link @me system variable with the user table in condition tab on in the GI.

That might work for you if you only want the user to see the users own Sales details - that could work for you.

Have a great weekend.


Reply
Tim Rodman
Posts: 3199
 Tim Rodman
Admin
October 28, 2018 8:27 pm
(@timrodman)
Famed Member
Joined: 10 years ago

The only special parameter variables that I am aware of are @Me, @MyGroups, @MyWorktree, and @Today.

But it would be nice if we had a @Company and @Branch variable (or something like that).

Both @Company and @Branch would be needed because in 2018 R2 there aren't just Branches, but both Companies and Branches.

Company/Branch that you have selected doesn't mean that you're "logged in" to a Company or Branch. It's just a default value for any new transactions. This was made more clear in 2018 R2 by moving the selector to the top next to the Business Date which is also just a default value for any new transactions.

But even though the Company/Branch selector and the Business Date are default values for new transactions, the @Today variable respects the Business Date, so it would make sense to me that we could also have @Company and @Branch variables which respect the Company/Branch selector.

I created an idea for this in case you want to vote on it:
https://feedback.acumatica.com/ideas/ACU-I-1784


Reply
Laura Carpenter reacted
 Christopher van Heerden
(@christopher-van-heerden)
Joined: 7 years ago

Member
Posts: 11
November 9, 2018 2:30 am
Reply toTim RodmanTim Rodman

Good morning Tim.

ย 

Thank you for the suggestions and thank you for adding this ti the Ideas.

@Company and @Branch would really help us a great deal.

ย 

Regards,

Christopher


Reply
Tim Rodman reacted
Posts: 11
 Christopher van Heerden
Topic starter
November 22, 2018 5:37 am
(@christopher-van-heerden)
Member
Joined: 7 years ago

Hey guys.

ย 

This is how you do it (Thank you Sergey) - a bit more work but you get tonnes of extra functionality:

https://asiablog.acumatica.com/2018/11/dashboards-based-on-real-screen.html

Kind regards,

Christopher


Reply
Tim Rodman
Posts: 3199
 Tim Rodman
Admin
November 27, 2018 10:28 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Thanks for the link Christopher! I have been getting braver and braver to start learning how to write code for situations like this. You definitely get a lot more control with writing BQL. It's all of the C# that you have to wrap around the BQL that still scares me ๐Ÿ™‚


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,527 Topics
  • 10.9 K Posts
  • 22 Online
  • 2,412 Members
Our newest member: Peter Paasch
Latest Post: Can't export GI's to excel that contain the FATrans DAC after upgrade to 2025 R1 in less than 25 min
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • Tim Rodman amassey
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright ยฉ 2026 ยท AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

โ€นโ€บร—

    โ€นโ€บร—