Solved

Script Error Message

Posted on 2014-04-08
2
177 Views
Last Modified: 2014-04-09
Hi there,

I have the following formula to group records in my report;

if {GfApls_1ApApP_1.GfApls_1ApApP_1_Description} in ["Bank 13-14", "Food Bank 12-13",
"Bank2 13-14"]
then {GfApls_1ApApP_1.GfApls_1ApApP_1_Package}
else
Split({GfApls_1Ap.GfApls_1Ap_Description},"_")[2]

This worked before but now that I have added the first criteria I receive the error message, "A Script must be between 1 and the size of the array" -

Does anyone have an idea of what is happening here?  Please let me know if anything is unclear.
Thanks very much!
CS
0
Comment
Question by:rporter45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 250 total points
ID: 39987804
Apparently some values don't have a _ in the string.

Try

if {GfApls_1ApApP_1.GfApls_1ApApP_1_Description} in ["Bank 13-14", "Food Bank 12-13", "Bank2 13-14"]
then {GfApls_1ApApP_1.GfApls_1ApApP_1_Package}
else if Instr({GfApls_1Ap.GfApls_1Ap_Description},"_") > 1 then
     Split({GfApls_1Ap.GfApls_1Ap_Description},"_")[2]
Else
    {GfApls_1Ap.GfApls_1Ap_Description}

Open in new window


mlmcc
0
 

Author Closing Comment

by:rporter45
ID: 39988565
That worked perfectly! Thank you very much, I never considered that would have been the issue.

Have a great day,

CS
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question