Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merge Identical Items After URLDecode()

Status
Not open for further replies.

madcrystal

Technical User
May 5, 2011
8
0
0
US
I'm pulling data where some (but not all) is URL encoded. For instance:

20 - Hello World
30 - Hello%20World

Running URLDecode on the incoming data results in:

20 - Hello World
30 - Hello World

Whereas I'm looking for the data to look like this:

50 - Hello World

Thanks, anyone!
 
Insert a group on:

if ubound({@decodedstring}) >= 2 then
split({@decodedstring},"-")[2]

Drag the result into the group footer. Then create a second formula:

val(trim(split({@decodedstring},"-")[1]))

Place this in the detail section and right click on it and insert a summary (sum) at the group level.

Then suppress the detail section and group header.

-LB
 
Hi LB, thanks for the reply. I gave it a whirl and got barked at with the following when setting up the initial formula:

"An array is required here."

@decodedstring is (or is acting like..) an array when I drag it into the report. The content of the formula is simply:

URLDecode({database.field})

Any ideas? Thanks again! (Are you available for outside of Tek Tips consulting?)
 
Sorry, that should have been:

if ubound(split({@decodedstring},"-")) >= 2 then
split({@decodedstring},"-")[2]

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top