Hi,
I have the columns Product_en,Product_ge,product_fr etc.... how can i show the related data based on user login.Suppose if the user login with german it should fetch product_ge.please give me the solution.
Thanks!
Anand.
#sq($account.personalInfo.userName)#
returns the actual login (german) in a query,
So:
CASE #sq($account.personalInfo.userName)#
WHEN 'german' THEN [product_ge]
WHEN 'french' THEN [product_fr]
else
null END
A bit crude though..
Adding a table mapping login's to language preferences would be better.
You might also look into the runLocale session parameter. If the values correspond to the column suffix then something like this might be what you want:
#'Product_'+ $runLocale#
If the contents of the runLocale don't exactly match the suffix then a parameter map would be needed (e.g., key en-us; value en). Then might be closer to what you're after:
#'Product_'+#$LocaleMap{$runLocale}#
Not sure I've got the syntax down exactly, but the general idea is covered in a number of ways in the FM user guide.