Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please I need HELP!
I have a table currency... everything is working fine...
But I have just one Problem, without selecting it should take the USD
I have a problem:
This is my table:
Currency:
LOAD * INLINE [
LocalCurrency, ExchangeRate
AUD, 1.0908
CAD, 1.0187
EUR, 0.7399
GBP, 0.6650
USD, 1.0000
];
My Variable:
vCurrency=MaxString(ExchangeRate) --->>>> Here is my Problem!
I need something that should take the USD Currency
the MaxString take the AUD, the MinString take the GBP... is logical, but there is nothing to tell take the middle one.. because USD is 1.0000 and it is in the middle so I tried with the median.. but it doesnt work...
How can I fix this Problem.... I need HELP....
Hi,
try to include a "if" condition in your variable as follow:
vCurrency=if(CurrencyCode ='AUD' OR CurrencyCode='CAD' OR CurrencyCode='EUR' OR CurrencyCode='GBP', maxString(ExchangeRate),1.0000).
Of course this wouldn't be adequate if u had hundreds of Currency codes for instance. Still working on it...
Hello jenni,
try this expression:
vCurr= FieldValue ( 'ExchangeRate',FieldIndex('LocalCurrency' , 'USD'))
HtH
Roland
in addition to my post above:
vCurr= USD;
vCurrVal= FieldValue ( 'ExchangeRate',FieldIndex('LocalCurrency' , '$(vCurr)'));
This makes it more flexible and better readable, in my oppinion.
RR
First, Thank you Roland for ur help! I've already tried with the FieldValue... and it dosent give me the right output
I am searching for other solution...
I uploaded my app...
what I want it is : like "minString or maxString" to peek the String of USD....
Everything working very well, but I just need, If nobody selecting the currency it should be in USD... Therefore I need somthing like maxString or kind of that...
Could you please have look.... I am lost there...
vCurr= FieldValue ( 'ExchangeRate',FieldIndex('LocalCurrency' , 'USD')) --> that is working well, but then I can't selecting other Currency... because it's fix defined....
Hi,
try to include a "if" condition in your variable as follow:
vCurrency=if(CurrencyCode ='AUD' OR CurrencyCode='CAD' OR CurrencyCode='EUR' OR CurrencyCode='GBP', maxString(ExchangeRate),1.0000).
Of course this wouldn't be adequate if u had hundreds of Currency codes for instance. Still working on it...
THANK you SO much!!!!!!!!!! ! It's a certification task ... where I was lost... Thanks a lot!!!!!
Your welcome, it’s a pleasure!!