Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to allow user adjust the exchange rate ?

Hi All

I have the below script :-

RATE:

LOAD * INLINE [

Currency_P, RATE_P

SG, 1

MY, 2.5

INDO, 8300

THAI, 25

];

Now the exchange rate fix at 8300 for SGD to Indonesia. cannot be change by user , only developer can change.

My issue :-

when the currency exchange rate for SGD to Indonesia changes to 9000 ,  i need to manually modify the above script from 8300 to 9000.

may i know it there a way i can make it dynamic . meaning user can change the value to 9000 default is 8300.

So when user click on default it will return to 8500 , and they are allow to change to 9500 or any value they like.

any solution ?

Paul

1 Solution

Accepted Solutions
Not applicable
Author

Hi

use the inputfield function in script

inputfield RATE_P;

RATE:

LOAD * INLINE [

Currency_P, RATE_P

SG, 1

MY, 2.5

INDO, 8300

THAI, 25

];

change RATE_P values in the listbox.

View solution in original post

21 Replies
Not applicable
Author

Hi All

My QV doc

Paul

Not applicable
Author

You can add 4 variables and let user to input their values. like this:

Untitled.png

don't know if it works.

Not applicable
Author

My requirement is if user select  indonesia i also want this exchange rate to be apply in fomular for cal the selling price. User can select by country. It is possible. As shown from my script posted on my question. It is possible to achieve this as well ?

Sent from Samsung Mobile

saumyashah90
Specialist
Specialist

Hey you have loaded it Inline.It can not become dynamic if used.

1)What you can do is load this from an excel and change value in excel instead of from the code.

or

2)No need to load any thing.During Run Time,put values in the variables and in calculation you can use those variables.


Not applicable
Author

Hi Sau

your first option i still need to change the excel value , which is look quite a good solution for me . as change from excel is much better then change in script. less error. but still not dynamic , when i am not around for 2 week , they need to wait. as i am the only one can make changes.

your second suggestion look better , can you share with me a bit more how can i achieve this , for example my expression :-

sum(LIST_PRICE * RATE_P)

RATE_P depend on user selection :-

if user select singapore RATE_P=1.

if user select malaysia RATE_P=2.5.

if user select Thailand RATE_P=25.

if user select Indonesia RATE_P=9000.

Notice that RATE_P is depend on user selection of country.

your approach i believe is using below :-

lET R_SGD = 1;

lET R_MRY = 2.5;

lET R_THAI = 25;

lET R_INDO = 9000;

How can i make it dynamic for your approach ?

Paul

Not applicable
Author

Hi Sir

Enclosed my QV doc for your ref. on my present approach.

saumyashah90
Specialist
Specialist

Your Answer encolsed in qvw

saumyashah90
Specialist
Specialist

you can change variables in UI only and you will proper output.

Please mark the answer correct and like it  if you get your answer.

Not applicable
Author

Hi

use the inputfield function in script

inputfield RATE_P;

RATE:

LOAD * INLINE [

Currency_P, RATE_P

SG, 1

MY, 2.5

INDO, 8300

THAI, 25

];

change RATE_P values in the listbox.