GI to default to show values in UserPreferences.DefBranchID
Is it possible to make a GI (or ideally, a dashboard tile based on that GI) sensitive to the value in UserPreferences.DefBranchID?
(I reckon that if there is no value in UserPreferences.DefBranchID, this requirement, ideally, would be ignored)
I have tried to edit the filter on the dashboard gadget but the 'Value1' field doesn't allow me to pass through a dynamic field such as UserPreferences.DefBranchID - it only allows me to hard-code a certain value.
Perhaps there is another way to go about this.
Or perhaps this related Community Idea is as far as we can get.
It would just be handy if we could retrieve the value for the User’s default branch and show them the data for that branch.
Page 1 / 1
Hi Arlene @AWelty24 !
If you don’t need a dynamic parameter and just want the results to default based on the user’s default branch, I would add the UserPreferences DAC to the list of tables in your GI and join it by the BranchID to your transactional data.
We had a slightly different requirement recently, to filter dynamically based on the Branch selected in the company/branch selector. We used the customization technique referenced towards the end of the comments on the thread below, and so far it seems to be working great. The customization adds a new DAC which makes the “current” branch available for use in a GI.
Or perhaps this related Community Idea is as far as we can get.
For what it’s worth, I voted on the 3 year old idea, obviously there is a need for it as @lauraj46 reply indicates.
The challenge with ideas is there is no way to subscribe to new ones or receive updates to ones you have up-voted. The good news is Acumatica is actively working on getting a subscription feature available.
Hi @lauraj46 - thanks for chiming in.
So I had been wondering if I could/should join in that UserPreferences DAC- thanks for nudging me along on that. I added it and joined on the BranchID, thinking I’d need a left join in case the user’s default branch id wasn’t set (UserPreferences.DefBranchID NULL) . But even with an INNER join I was still seeing all the data. I wonder if it’s because I am not able to clearly enough indicate to the Inquiry that I want the Current, logged-in User’s value for UserPreferences.DefBranchID . It seems to me like maybe it’s linking on any instance fo the User Preference being set to that branch.
However the link you sent was helpful as I think it can get me there. Instead of using the customization project in the comments, I tried the main post’s technique of creating a ‘CurrentBranch’ parameter and calling that in my filter. That seems to be working ok. I’m torn on this as a long-term solution because ideally, I’m just setting a default for the first time the user looks at the inquiry. Ideally I wouldn’t be necessarily LIMITING everything the user can see by only ever showing the current logged-in branch. However - I think this is ok for now.
Thanks for all the helpful ideas you share on the Community and it’s great to hear from my friend! :)
Also - thanks for upvoting the idea @DConcannon !
Hi @AWelty24 ,
Nice to hear from you, and glad that you got this working!
Good point about the UserPreferences including all users. It sounds like you already have a working solution, but if you ever have reason to fix the join you should be able to add a condition to filter it on the current user. You can use the @me option to dynamically default a parameter with the current user, and then add that parameter to the Conditions.
I also upvoted the idea. This requirement comes up a lot and it would be great if there was a standard parameter that worked like @me.
Laura
@lauraj46 Thank you for reminding me about the @me option! Brilliant as always. :) Arline