Skip to main content
Answer

Generic Inquiry Results Grid Issue

  • February 20, 2023
  • 2 replies
  • 169 views

Forum|alt.badge.img

I have a Generic Inquiry that will display the Box Size and Qty used by month for the current year. 

In the Results grid I have am using SOShipment.ShipDate_Month as the Month field. The GI works fine and I have a Pivot Table that works very nicely. 

I’ve been asked if I could possibly add the month name (January, February etc) in stead of the month number (1,2,3...)

So I modified the SOShipment.ShipDate_Month in the Result Grid as follows;

=iif([SOShipment.ShipDate_Month]=1,'January',iif([SOShipment.ShipDate_Month]=2,'February',iif([SOShipment.ShipDate_Month]=3,'March',iif([SOShipment.ShipDate_Month]=4,'April',iif([SOShipment.ShipDate_Month]=5,'May',
iif([SOShipment.ShipDate_Month]=6,'June',iif([SOShipment.ShipDate_Month]=7,'July',iif([SOShipment.ShipDate_Month]=8,'August',
iif([SOShipment.ShipDate_Month]=9,'September',iif([SOShipment.ShipDate_Month]=10,'October',iif([SOShipment.ShipDate_Month]=11,'November',iif([SOShipment.ShipDate_Month]=12,'December',''))))))))))))

 

When I run the GI I get an error that reads “Case expressions may only be nested to level 10.”

If I remove iif([SOShipment.ShipDate_Month]=11,'November',iif([SOShipment.ShipDate_Month]=12,'December', from the field and run the GI it displays the name as it should.

My question is, is there a work around or better may to Display all the Month Names?

Thank you!

Best answer by miguel80

Hi!

There’s a function called MonthName() on the generic iquiry. You can use that one. 

That may affect your Pivot Tables order, because it will not know how to arrange the month names, to solve this you can concatenate a number with the months name “1 January, 2 February,...”

2 replies

miguel80
Semi-Pro III
Forum|alt.badge.img+3
  • Semi-Pro III
  • Answer
  • February 20, 2023

Hi!

There’s a function called MonthName() on the generic iquiry. You can use that one. 

That may affect your Pivot Tables order, because it will not know how to arrange the month names, to solve this you can concatenate a number with the months name “1 January, 2 February,...”


Forum|alt.badge.img
  • Author
  • Freshman I
  • February 20, 2023

miguel80

Thank you for the quick reply, that looks like it will do the trick.