Hi Buddhi,
Current support in Data Modules for parameters is very limited, because the Modeling UI doesn't (yet) support prompts for parameters.
Using the macro function ParamValue will allow you to work with parameters, but it has one big difference with the prompt and promptmany macro function in that Authoring will not be informed about the existence of this parameter and will never cause a generated prompt to show up for that parameter. This also includes Authoring's prompt wizard, which shows a list of existing parameters. Parameters referenced by ParamValue only, will not show up in that list.
// Henk
------------------------------
HENK CAZEMIER
------------------------------
Original Message:
Sent: Tue February 25, 2020 09:04 PM
From: Buddhi Gupta
Subject: Data Module Prompt Macro
Actually , found the solution by using ParamValue function instead of #prompt()# function:
case when #ParamValue ( 'pLanguage', 'en' )# = 'en'
then
English_name
else
spanish_name
end
Now there is no error in Data Module.
------------------------------
Buddhi Gupta
Original Message:
Sent: Tue February 25, 2020 08:21 PM
From: Buddhi Gupta
Subject: Data Module Prompt Macro
Hi
I am getting error when trying to add prompt macro as calculation in Data Module
The expression is not valid. XQE-PLN-0019 Need to resolve prompts.
After clicking ok, I can see field is added as Numeric field even though parameter is string and can't see data any more.
Is it a known issue with Data Module or any work around? Thanks for any inputs!
------------------------------
Buddhi Gupta
------------------------------
#CognosAnalyticswithWatson