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 Generic I...
Filtering by a segm...
 
Notifications
Clear all

Questions Filtering by a segment within a GL Subaccount

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by Tim Rodman 6 years ago
6 Posts
4 Users
0 Reactions
4,532 Views
RSS
Shawn P Slavin
Posts: 196
 Shawn P Slavin
Topic starter
January 19, 2018 1:11 pm
(@shawn-p-slavin)
Estimable Member
Joined: 5 years ago

We want to create a GI where we pull GL transaction detail and filter the results with a parameter. The parameter would be a valid segment value from a GL subAccount.

Two challenges:

How to link a parameter to a schema for a specific GL Subaccount Segment (example: SubAccount Segment 3)

How to build the condition to filter by the parameter value. (example: Parameter = {SegPrompt} | Conditions tab: datafield = [SubAccount], condition = equals, value = "???-???-"&{SegPrompt}&"-??")

Any ideas? Am I making this too hard and overlooking something obvious? 


5 Replies
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
January 19, 2018 11:24 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Hmmm, good one.

You could use GL.Sub.SubCD to get the full subaccount functionality in the parameter, but you'd have to hit F3 in each subaccount segment and choose something, which isn't what you want. You just want to choose one segment.

I'm not sure how to get just one segment. I tried the SegmentValue table, but that didn't work.

One way I could think of would be to manually duplicate the Segment values into a Combobox parameter (not ideal), then use the Substring function to compare the parameter to only the portion of the Subaccount value that you care about.


Reply
Royce Lithgo
Posts: 557
 Royce Lithgo
February 11, 2020 11:57 pm
(@roycelithgo)
Honorable Member
Joined: 6 years ago

This problem has been bugging me for ages. Previously I'd written some nasty GIs with complicated criteria to do matching on ranges of subaccounts. What i really wanted to do was apply criteria to specific segment values, looking for full or partial matches on those segments. 

@timrodman I initially tried your combobox solution, which worked but is a little ugly as the combox parameters appear when the GI is run. My next iteration was to use CS.SegmentValue table and apply criteria to that. This works much better as the criteria can be applied directly on the Conditions tab. Then relate SegmentValue to GL.Sub - the trick here is to use a Substring in the join criteria so that you match the specific segment value to it's position within the concatenated Subaccount.

Example:

In this instance ItemSegmentValue has been filtered on DimensionID = SUBACCOUNT and SegmentID = 1, in this case it is our Product Segment which is 3 characters long.

Using this approach I've managed to do a complete rewrite of a really nasty GI I wrote which used pattern matching on the complete Subaccount. Thanks Tim for your inspiration!


Reply
Wyatt.ERP
Posts: 128
 Wyatt.ERP
February 13, 2020 11:20 am
(@wyatt-erp)
Estimable Member
Joined: 6 years ago

I'm seconding @royce-lithgo 's method.  I use this to join back onto the SegmentValue table once for each subsegment, I just don't think there is any other way to handle it.  Although, I lazily use a nested LEFT and RIGHT, when Substring is the superior method. 


Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
March 7, 2020 9:44 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Nice @royce-lithgo! Thanks for sharing.

You know it's good when GI wizard @wyatt-erp agrees with it!


Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
March 14, 2020 5:27 am
(@timrodman)
Famed Member
Joined: 10 years ago

I just noticed something that, while not really HELPFUL for this discussion, is at least RELEVANT for this discussion.

Thought I'd point it out.

When you add a Subaccount to a Pivot Table, you can choose which Segment you want to display.


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 51 Online
  • 2,338 Members
Our newest member: Shoaib Shafquat
Latest Post: Pick List report suddenly not splitting on Shipment
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

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×