Solved

How do i access the value of a date stored in a user-defined field in a generic inquiry calculation

  • 30 October 2021
  • 11 replies
  • 102 views

Userlevel 2
Badge

I am building a GI that needs to be able to pull a user defined field date and perform calculations on it such as dateadd or datediff. When I try to do this I get a virtual field error message coming up on my gi. If this date field was stored in an attribute I know how to get the date value from the CS answers table but it seems that user defined Fields do not store the values in the CS answers table - where are these stored in how can I perform calculations against them?

icon

Best answer by DanielStarke 1 November 2021, 06:19

View original

11 replies

Userlevel 7
Badge +10

Hi @DanielStarke  If possible, can you please share the GI here.

Userlevel 2
Badge

Hello @Naveen B it is the same GI and scheduled date field we were working on yesterday. Link below. 

 

I want to be able to have a column that says the number of days ago that it was scheduled, as in something like Today() - scheduledate . But this will not work as the scheduled date is not accessible to do calculations on

 

I'm also having to do a slight add on to adjust the dates for our NZ timezone

 

https://community.acumatica.com/topic/show?tid=7116&postid=22937

Userlevel 2
Badge

=[SOOrder.AttributePCSCHEDDAT] - today() is the formula i have in my GI at present where the scheddat is an attribute connected to the Sales order UDF 

this is the message that pops up

 

Userlevel 7
Badge +10

Hi @DanielStarke Hope you are trying to get the difference between the Today and the Scheduled Date.

Please find the formula below for your reference.

=DateDiff( 'd', Today(), [SOOrder.AttributeNDATE])

 

 

Userlevel 2
Badge

Hello @Naveen B , it almost looks right - I am getting another sort of error now: 

 

 

Userlevel 2
Badge

I noticed you had an N in your attribute name, so i added it, but also i tried without and i get the same error

Userlevel 2
Badge

Hello @Naveen B  I have been told that the data fields are stored differently in MYOB Advanced (Which I use) 

 

@dipikaa62  - not sure if this is your acumatica handle, but… :) 

Userlevel 7
Badge +10

Hi @DanielStarke  I checked in Acumatica and it is working as expected, will check in MYOB instance and let you know here.

 

Userlevel 7
Badge +10

Hi @DanielStarke  I just verified in MYOB instance and validation is passed.

But when I check with GI result, actually it is NOT calculating the Date Difference, where as it is calculating in the Acumatica instance.

This might be the limitation of MYOB, but I’m NOT sure.

 

 

Userlevel 2
Badge

I have cracked the code! we will use it in a filter and we use the where scheduled date is less than or equal to  @today for the today's schedule and the same formula + 1 for tomorrow's schedule etcetera

Userlevel 2
Badge

argh… now i have another issue…. what about friday… when you want to see monday as “tomorrow”

 

this now links to another thread on here: 

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved