Solved

Script Error Message

Posted on 2014-04-08
2
176 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
2 Comments
 
LVL 100

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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