Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have to use variable in Fieldindex function.
For example: =fieldindex('Fieldname, $(vCurrency)&amount).
Here vCurrency has $, £, €. and there are 3 buttons like USD, GBP, EUR.
Here Fieldname has $amount, £amount and €amount.
If i click USD buttion $ should display at vCurrency dynamically and GBP, EUR respectively.
Regards,
Nihhal.
Hi Sunny - Its working with small changes.
Fieldindex('Fieldname, vCurrency&'amount').
Regards,
Nihhal.
Are you missing a single quote here or is that just a typo?
=FieldIndex('Fieldname', $(vCurrency)&amount)
Have a look here: Missing Manual - FieldIndex()
- Marcus
Not working sunny. Thanks for swift response.
Thanks for response Marcus however, this is not relevant to my requirement.
Fieldindex return the position of the field value into the fildname, but values in your tables are stored with the currency type?
I'm not so sure about it then fieldindex will return only a number - nothing else. Which result do you expect?
Maybe you need something like this:
fieldvalue('Field', fieldindex('Fieldname', $(=$(vCurrency)&amount)))
- Marcus
Not sure what you want to achieve.
The syntax is
Syntax:
FieldIndex(fieldname , value )
FieldIndex - script function ‒ QlikView
I assume your values are numbers, right? And you want to get the index in the symbol table for your number looking e.g. in the symbol table of $Amount, i.e. both the field name and the value need to be looked up dynamically before evaluating FieldIndex() function?
Like this when using button '$' / USD:
FieldIndex('$Amount', $Amount)
after replacing the variable?
Hi Sunny - Its working with small changes.
Fieldindex('Fieldname, vCurrency&'amount').
Regards,
Nihhal.
Hi Nihhal,
Try this,
fieldindex('Fieldname', $(vCurrency)&'amount')