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...
Results Grid - Sche...
 
Notifications
Clear all

Questions [Solved] Results Grid - Schema Field

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by Tim Rodman 6 years ago
13 Posts
6 Users
4 Reactions
8,103 Views
RSS
Posts: 4
 Emma
Topic starter
March 30, 2018 3:55 pm
(@emma-m)
Member
Joined: 8 years ago

Can someone please explain to me what the Schema Field does in the GI Results Grid and how it interacts with the Data Field? 

Also, how do the Aggregate Functions settings impact the results?  Thank you!


12 Replies
MichaelHansen
Posts: 149
 MichaelHansen
March 30, 2018 4:15 pm
(@michaelhansen)
Estimable Member
Joined: 6 years ago

Aggregates: If you decided to set a group, let's say you're grouping all your PO Lines by your PO Number, then you need to decide how to display the value for things like "Cost" at the line level. Did you want to see which line has the highest cost per PO? Use MAX. Want to see the cost for all the items together? Use SUM. These only affect values who are grouped. The system just wants to know what to do with that pile of values you grouped together.

 

Schema: I find this to be largely useless. What it does it copy attributes. Want to use 6 decimal places instead of 2? Set that field to a schema who has 6 decimal places. For example my inventory items only display 2 decimals for length, if I set the schema to being my item's volume, it'll now show 6 decimals. I find this useful ONLY when I need to shorten a value. Say my boss doesn't care that I can show him 6 decimals of volume. I may try to apply a schema with only 1 or 2 decimals when I display the volume in my GI.


Reply
Rena Jacobs and Emma reacted
 Emma
(@emma-m)
Joined: 8 years ago

Member
Posts: 4
March 30, 2018 4:20 pm
Reply toMichaelHansenMichaelHansen

that seems straightforward enough... thank you!


Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
April 2, 2018 9:58 am
(@timrodman)
Famed Member
Joined: 10 years ago

Additional point on the Schema column. I've found that I pretty much always need it when I do a calculated column because Acumatica doesn't know how to format the result. It's a little weird though the way you pick a column with the format that you want. I kind of wish it would function like the Format field in Report Designer where you could either choose a field that has the format you want or put in a format code. Note though that it isn't only applying formatting, it also determines whether or not you will get a hyperlink on the record because some fields have that functionality built-in.


Reply
Rena Jacobs reacted
Alisann Crough
 Alisann Crough
(@alisann-crough)
Joined: 7 years ago

Eminent Member
Posts: 28
September 3, 2019 3:30 pm
Reply toTim RodmanTim Rodman

@timrodman

Posted by: @timrodman

Additional point on the Schema column. I've found that I pretty much always need it when I do a calculated column because Acumatica doesn't know how to format the result. It's a little weird though the way you pick a column with the format that you want. I kind of wish it would function like the Format field in Report Designer where you could either choose a field that has the format you want or put in a format code. Note though that it isn't only applying formatting, it also determines whether or not you will get a hyperlink on the record because some fields have that functionality built-in.

1. Do you know of a Field that has no decimal places that can be used?

2. Can you provide a link to more info on format codes?

Thanks!


Reply
Ellie
Posts: 129
 Ellie
November 14, 2018 5:45 pm
(@ellie)
Estimable Member
Joined: 6 years ago

Adding on to the original question:

Can i aggregate with an If condition?

Example:

To get the Qty sold of each item i use the ARTran table, group by Inventory ID, add inventory ID and Qty fields to the results and make the aggregate function SUM.

That part is easy enough.

Next i want an additional column that shows the sum of Qty for each item for a specific customer (lets assume the customer can be hard coded in the GI). How can this be achieved?

I tried adding a condition =iif([ARTran.CustomerID]='Mycustomer',ARTran.Qty,''). and get this error:"Conversion failed when converting the varchar value 'Mycustomer' to data type int."

So i tried adding cStr to the condition like such :=iif(cStr([ARTran.CustomerID])='Mycustomer',ARTran.Qty,'') and got this error :"Error converting data type varchar to numeric."

I also tried adding ARtran twice (the second time with an alias) and joining the alias as a child to the parent with a condition that the customer ID is equal to 'Mycustomer'. This one does not error, but i get no results.

 

Any ideas?


Reply
MichaelHansen
Posts: 149
 MichaelHansen
November 14, 2018 6:09 pm
(@michaelhansen)
Estimable Member
Joined: 6 years ago

You don't need single quotes around your CustomerID. I'm really not sure why, but I hit that wall before when trying to set it in the conditions tab. If it still fails after removing the single quotes around Mycustomer, please reply back. I have a quite a few ARTran GI's that I can easily modify to try and replicate your behavior, as do many of the others on this forum.


Reply
Ellie
Posts: 129
 Ellie
November 14, 2018 6:36 pm
(@ellie)
Estimable Member
Joined: 6 years ago

oh interesting

Which of the failed examples are you suggesting this for?

I tried that in all 3 and i get "Error: A field with the name Mycustomer cannot be found."

i will also clarify after rereading my post, i did not add a condition in the conditions tab, but rather added a condition in the formula in the results tab.

Adding a screen shot:


Reply
MichaelHansen
 MichaelHansen
(@michaelhansen)
Joined: 6 years ago

Estimable Member
Posts: 149
November 14, 2018 7:15 pm
Reply toEllieEllie

I assume Mycustomer is a customer ID in your system correct? For example I have customer ID: ALB-TOLLES and the description is Albertson's Tolleson. So I would use ALB-TOLLES without quotes for the comparison, I would NOT use the description text. Iff should use the same semantics as the conditions tab. If Mycustomer is a parameter, you need to use parameter notation for it, which would be [Mycustomer], although I've never tried running a check against a parameter in the results grid.


Reply
Ellie
 Ellie
(@ellie)
Joined: 6 years ago

Estimable Member
Posts: 129
November 14, 2018 7:36 pm
Reply toMichaelHansenMichaelHansen
Ellie

correct mycustomer is the customer ID, not the description or a parameter.

 


Reply
Royce Lithgo
Posts: 557
 Royce Lithgo
November 15, 2018 6:04 pm
(@roycelithgo)
Honorable Member
Joined: 6 years ago

It's not possible to do the type of comparison you are attempting inside a formula. To see why, add the field CustomerID to your query results and mouse over the exclamation mark that exists. Customers are Business Accounts. They are stored as an ID and a CD (code) field, ie. BAccountID and AcctCD. To match to the actual string value, you need to be joining against acctCD and you need to use quoted strings. 

You should be able to join BAccount to your query (join ARTran.CustomerID to BAccountID) and then you can apply criteria against BAccount.AcctCD to match to specific customer IDs (using quoted strings). 

In GIs you need to be careful as what can be displayed as a Result can not always directly be used in Formulas. If there is an exclamation in the result column, it means that Acumatica is doing some smarts behind the scenes that aren't done inside a formula. 


Reply
Ellie
Posts: 129
 Ellie
November 15, 2018 6:15 pm
(@ellie)
Estimable Member
Joined: 6 years ago

Was just about to post that solution!

There were 2 issue with the original formula.:

1. As you mentioned, i couldn't use the Id from Artran. so i joined the customer table( same as the BAccount in your case).

2. I added cdbl() to the true part of the formula, which have numeric value.

Ended up with: =iif([Customer.AcctCD]='Mycustomer',cdbl(IIf( [ARTran.DrCr]='D', -1, 1 )*[ARTran.Qty]),0)

I also grouped by Inventory ID and then CustomerID

Thanks for your explanation @Royce Lithgo


Reply
Tim Rodman reacted
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
September 28, 2019 3:51 pm
(@timrodman)
Famed Member
Joined: 10 years ago

@alisann-crough

1. How about SOOrder.Priority, will that work?

2. There is a really good Report Designer Formatting section in the S130 Reporting: Data Retrieval and Analysis 2017 R2 (click here) course. Click here and scroll to page 86 to see it:


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 44 Online
  • 2,386 Members
Our newest member: Tim Gaukroger
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

  • Amy Foster
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.

‹›×

    ‹›×