Solved

Script Error Message

Posted on 2014-04-08
2
173 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now