Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

mbespartochnyy
Contributor

InputField Duplicate Keys

Hello everyone,

I have a quite a weird thing happening in QlikView and I'm hoping that someone else seen this and knows what's going on. I have a simple script:

INPUTFIELD [AFP Code Input];

INPUTFIELD [Rate Input];

INPUTFIELD [Volume Input];

LOAD * INLINE [

    ID, AFP Code Input, Rate Input, Volume Input

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

];

When I run that script, I get "Duplicate keys when loading Input Field". If I have 14 IDs or 16 IDs, it runs fine. When I have 15 IDs, it counts 14 twice:

Capture.PNG

Even though the last number in the script is clearly 15 and not 14. Is there something magical about number 15?

Thanks,

Mikhail Bespartochnyy

1 Solution

Accepted Solutions
MVP
MVP

Re: InputField Duplicate Keys

Can't say why Input Fields behave the way they do.... but this seems to be working (at least for the sample)

INPUTFIELD [AFP Code Input];

INPUTFIELD [Rate Input];

INPUTFIELD [Volume Input];

LOAD RowNo() as ID,

  '' as [AFP Code Input],

  '' as [Rate Input],

  '' as [Volume Input]

AutoGenerate 15;

4 Replies
MVP
MVP

Re: InputField Duplicate Keys

Can't say why Input Fields behave the way they do.... but this seems to be working (at least for the sample)

INPUTFIELD [AFP Code Input];

INPUTFIELD [Rate Input];

INPUTFIELD [Volume Input];

LOAD RowNo() as ID,

  '' as [AFP Code Input],

  '' as [Rate Input],

  '' as [Volume Input]

AutoGenerate 15;

mbespartochnyy
Contributor

Re: InputField Duplicate Keys

InputFields are the worst. Great concept but such a weird behavior, wasted so much time on this. Anyway, thanks for the alternative !

Mikhail B.

MVP
MVP

Re: InputField Duplicate Keys

I agree.... the functionality is very powerful, but not sure why it isn't looked after...

jafari_ervin
Contributor II

Re: InputField Duplicate Keys

please comment your input field command and reload then uncomment. everything will be correct;