Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

In the Edit Script how can create a new field, with an attribute from an existing

Hello all,

I would like to use an existing field called Project ID, in order to create a new field called Office ID.

Each Project ID is made up of four key areas structured like.

Project Type-ProjectYear-Project Office-ProjectCount

The length of the characters between each "-" varies, but basically I'd like to create a new field that essentially grabs the Project Office. Is this possible using something like mid?

LOAD [Project ID],

  replace(mid([Project ID], X, X), '-', '') as [ProjectOffice],

Field

Field

Regards,

Myles

1 Solution

Accepted Solutions
MVP
MVP

Re: In the Edit Script how can create a new field, with an attribute from an existing

load

......,

subfield([Project ID], '-', 3) as [ProjectOffice],,

......

3 Replies
MVP
MVP

Re: In the Edit Script how can create a new field, with an attribute from an existing

load

......,

subfield([Project ID], '-', 3) as [ProjectOffice],,

......

Not applicable

Re: In the Edit Script how can create a new field, with an attribute from an existing

Thanks Massimo!

rajkumarb
Contributor II

Re: In the Edit Script how can create a new field, with an attribute from an existing

Hi

You can rename your current field  with 'as' new field name,

Community Browser