Parsing query variable

I am facing a problem while parsing query output variable.
Scenario:-
I have stored session variable name as the column value of a
table.
Now I have used cfquery tag and get the result column value
which is the session variable name. But cold fusion didn't parse
that session variable with its actual value.
Step1- Table view by using cfdump tag
query - Top 1 of 1 Rows
PARAMETERNAME - PARAMETERVALUE
1 @matterspacename - #SESSION.Matter_space_Name#
Step2- Using cfquery tag to fetch data from table:-
<cfquery name="qSendNotification"
datasource="#Database_DSN#">
select
ParameterName,
ParameterValue
from
Tbl_EventParameterDetails
where
NotificationEventID = 1
and IsActive = 1
</cfquery>
Step3- Now using result of cfquery output.
<cfset event_data= #qSendNotification.ParameterValue#>
Step4- When I used cfdump to display result value its shows
as under:-
<cfdump var="#event_data#">
output:- #SESSION.Matter_space_Name#
Instead of parsing actual value of the session variable it
displays the session variable name.
Please help me, How to parse this session value or if my code
has some error, please suggest me any other way to handle this
situation.
Thanks in advance

This is my actual code from which i m getting result from
cfquery and then concatinating it into a variable and then passing
it to the stored procedure.
<cfquery name="qSendNotification"
datasource="#Database_DSN#">
select
epd.ParameterName,
epd.ParameterValue
from
Tbl_NotificationEventParamaters as nep
inner join Tbl_EventParameterDetails as epd
on nep.EventParameterID = epd.EventParameterID
where
NotificationEventID = #NotificationEventID#
and nep.IsActive = 1
and epd.IsActive = 1
</cfquery>
<!--- concatinating parametername & parametervalue and
appending it into event_datal, parametervalue holds session
variable names--->
<cfset event_data="">
<cfloop query="qSendNotification">
<cfset event_data = event_data &
qSendNotification.ParameterName & "=" &
#qSendNotification.ParameterValue# & "|">
</cfloop>
<cfstoredproc datasource="#Database_DSN#"
procedure="stp_SendNotifictaion">
<cfprocparam type="in" value="#NotificationEventID#"
dbvarname="NotificationEventID" cfsqltype="cf_sql_integer">
<cfprocparam type="in" value="#event_data#"
dbvarname="NotificationEventData" cfsqltype="cf_sql_varchar">
<cfprocresult name="ResultSP">
</cfstoredproc>

Similar Messages

  • Dynamic query variable

    How can I have a variable inside the query variable?
    someQuery.dynVar# to be defined as "some text some text #
    url.someVar# some text"
    ColdFusion seems to disregard the CFML code contained inside
    the
    query or
    cffile[read] variables and outputs it with variable names
    surrounded with #. When it's set with
    <cfset> it's displayed as intended.
    How can I force CF to process CFML inside query
    variables?

    This reminds me of the biggest issue that has been bothering
    me for years. ColdFusion CANNOT do dynamic code evaluating. This is
    one of PHP's (it still sucks big time as a web application
    development language) greatest advantages over CF, although
    evaluating dynamic pieces of code is almost just as slow as
    including them from files, one by one. But still...
    CF's evaluate() can only evaluate functions, variables, etc.
    But not actual code, including tags, multiple statements, or
    anything complex like that.
    Actually, I'm not quite sure what you're trying to achieve
    here. It sounds like you want to set _triggers_ for variables, so
    that they would auto-update themselves as some other variables
    changes. Sounds impossible.
    Also, you're wrong when you say "it" works with
    <cfset>. Try this:
    <cfset var1 = "dang">
    <cfset var2 = "ding#var1#****">
    <cfset var1 = "">
    <cfoutput>#var2#</cfoutput>
    If this would work as you stated, you would get "dingdong".
    But you won't, since you can't process code dynamically within a
    variable in CF.
    So, you're best off with something like like cflib's UDF,
    which takes care of the parsing right when you need it.

  • JDBC Query Single Row service Parse Query

    Using JDBC Query Single Row service on an Oracle database,
    I specify a SQL statement like this:
    select abc, to_char(aDate, 'MM/DD/YYYY') from xyz where def = 123
    then I click the "Parse Query" button to try to map the query results to my variables, but the mapping window gives me 3 fields instead of 2:
    1. abc
    2. to_char(aDate)
    3. 'MM/DD/YYYY'
    how do I let it understand that there are only 2 fields in the results so that I can map it properly?
    thanks

    Got a new minor issue unrelated to the above, but I don't want to flood this forum with another new topic, so I'll stick this new thing here.
    I have a very simple process that only contains this JDBC Query Single Row service.
    In this query single row service, at the bottom of the property sheet, there's a section where it says "number of rows retrieved"...
    now, if I map this 'number of rows' to a variable (I set the variable's type as "int"), when I call my process (as a web service), it returns me nothing... all the output parameters are empty.
    If I remove the mapping of "number of rows", that is, there's nothing in that bottom section. Then my process works correctly, all the output variables contain correct data from my database.
    Has anybody encountered this? what's your solution please?

  • Text lines in the BW query variables screen

    Hi gurus.
    The bw users ask me to display some text lines in the BW query variables prompt.
    The text lines are saved in a custom table.
    The only idea that I've got is to use customer exit text variables and fill them in CMOD when I_step = 1.
    I don't like this solution (I should have more the 10 text lines and so I have to mantain more than 10 Text variables) but I can't find any other solution.
    Any new idea or solution?
    Is there in Bex enviroment a functionality (that I don't know) for doing somenthing like this ?
    Thanks fo any help.
    S.

    Hi,
    to resolve it you should create all the prompts in the BW query. You are using a query with 2 parameters and then a dynamic list of values. the dynamic list of values can only work after you entered the other values.
    Ingo

  • Unable to parse query when using dblink in forms 4.5

    Hi,
    I have created a query that uses a DBlink because I need to do query on a table located on another dbase. I've used the query on creating my report using Reports 6i. The report needs to be called from a menu on our system, which was developed under Developer 2000 (forms 4.5). The problem is, when I tried to access the report from the menu, it returns the error 'unable to parse query'. What I did after getting error was to create a dummy module using Forms 6i, and call my report from there. It worked fine.
    By the way, the table that I'm accessing using the dblink is under Oracle 9i dbase, and the dbase of the system that I've been working at is Oracle 8i.
    I don't have any idea on what's causing this error. Is there a compatibility issue when using a dblink located in Oracle 9i database with forms 4.5?
    Thanks!

    Hello,
    Not sure if it is the good answer, but I know that Forms does not recognize dblink and owner.object syntax. You have to create a simple synomym that point to the distant object and use this synonym within Forms.
    Francois

  • BW Query variable default value put in Crystal report variable question

    Why BW Query variable default value put in Crystal report variable for BO InfoView to open crystal report.
    I using Analyzer to open bw query,variables had default value ,but crystal report can't had variable default value ,and can't search variable  value.
    pho:
    [http://file.itpub.net/f/e38876ad4f6efb7e73980488e7d71f8d/4ae940e9/day_091029/20091029_2b04da1232144feba180OrB23SNvXtoT.gif/p/1.gif]
    [http://file.itpub.net/f/d93ddfe61e0eaf80429726c61f1a02ff/4ae940e9/day_091029/20091029_3211ffe04bf0302fbab5FRKnbwmH80p7.gif/p/BW_QUERY_Crystal.gif]
    Edited by: flying on Oct 29, 2009 8:20 AM

    I Know what to do .
    but Crystal report date variable value are Garbage characters "###".
    PHO:
    [http://file.itpub.net/f/39a8510104476707ae21c945db93ecba/4ae97949/day_091029/20091029_32dcbb7e7d99141483aesJ9KBJHXN0Kj.gif/p/2.gif]

  • BW Authorizations - Query variable with processing mode as "customer exit"

    Hi,
    Iam new to BW authorizations and have not yet worked on customer exit before. I was going through the documentation at various sites but I could not get the end to end description on how the query process( when using a variable for an InfoObject) works in case of customer exit.
    Let's assume that I am using  a query variable with processing mode as "customer exit" and at the exit I  write some code to extract user's authorizations from a z table. if this is the case, then when an end user runs a query,how will the the system know what value needs to be filled in the variable for the requesting user. Are the user details  also sent to the code along with the query variable? If so how. If I mis-understood the process then forgive me and let me know the correct process.

    Hi!
    welcome to SDN!
    customer exit variables need programing by user. so if you create a customer exit variable, you got to right a program which extracts values into this variable. we can do what ever we want in program, SAP will not deal anything ´with customer exits.
    with regards
    ashwin
    PS n:  Assigning point to the helpful answers is the way of saying thanks in SDN.  you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.

  • How to track query variable input in FM

    Hi All,
    There are a MultiCube1 and a Query1 based on it.
    There is Virtual Infoprovider1 based on Query1.
    And finaly there is a Query2 based on Virtual Provider1.
    How to check inputed variables of Query2 in FM for Virtual Provider1.

    Hi,
    there is no way to read query variables in the is_protected method, since data slice run time and query run time are separated.
    Of course you can do the 'usual' trick by implementing an exit variable, export some variable values to memory and read it in the is_protected method.
    But is_overlapping is the correct method to read the used selection (of a query of planning function filter) to do some initializing work. This method is called when a function is processed or a query will be opened. Is_protetecd is called on a record basis, i.e. maybe very often.
    Regards,
    Gregor

  • Query rule using query variables

    Hi All,
    I am working on a query rule in SharePoint 2013. I am trying to build a query text using query variables to provide profile based results to the users. The query text which I am using in the query builder is of the following format:
    {SearchBoxQuery} CombinedLanguage:{User.PreferredContentLanguage}
    but its not taking the user.preferredcontentlanguage value. Has any one worked on similar type of query rules using query variables? Please share your suggestions.
    Thanks !!

    Hi,
    As I understand, you cannot get the user.preferredcontentlanguage value.
    1. Make sure you have set the value of query variable {user.preferredcontentlanguage}, it will return -1 if not set.
    2. Make sure you search in the right result source.
    3. Please check the crawled property mapped to the managed property CombinedLanguage and make sure that there is at least one value indexed by the crawled property equal to the {user.preferredcontentlanguage}.
    The article below is about the query variables.
    https://technet.microsoft.com/en-us/library/jj683123.aspx
    The article below is about the different query variables return different result examples.
    http://techmikael.blogspot.in/2014/05/s15e03-query-variables-constant-trouble.html
    Best regards
    Sara Fan
    TechNet Community Support

  • BEx: How to change a Query Variable that is not visible in Filters List?

    Hello Experts,
    Good day, I'm currently editing an old query, I am changing the Query Variables with new ones, but I found one variable that I cannot replace.
    Please see the screenshot below, in the Query Properties Window [Variable Sequence Tab (right side of picture)] the Variable that I am trying to replace (Unit) is visible. But when I look for the variable in the "Filter Tab" (left side of picture) under Characteristic Restrictions, it doesn't exist in the list.
    How can I find this Variable and replace it with a new one?
    Other reports are still using this variable so it will impact the other reports if I simply edit the variable. So I need to replace it with a new variable instead.
    Thank you for your time.

    Hi,
            SInce you are searching for a variable for Unit, look into below screenshot and navigate to the variables.
    First click on drop down and select 'Entry for variable' then you will get lisl (after you click on drop down in 'Target Unit' drop down option.
    Normally these type of variable called 'Formula Variable' try editing any of the formula and locate the option as shown below,
    Hope it helps! don't forget to update the final solution and mark the correct/helpful answers.
    Remember it will help others to find the solution and motivate the members to answer your question.
    Thanks,
    Umashankar

  • How to enable wild search(*) on a query variable

    how to enable wild search(*) on a query variable?

    Prakash,
    When you build the variable, what did you use as the "Processing By"? Were there any other special options you had to use to get it to work....This is something our client base would love to use....
    Thank you in advance...
    Jim

  • Table name where query variables stored

    Hi All,
    can any one please tell me in which data base table all the custom query variables are stored???

    Hi Pousali,
      Check RSZGLOBV.
    Hope it Helps
    Srini

  • Query variables for 0CALDAY

    Hello gurus,
       I´m trying to create a query variable that shows the last calendar day(infoobject 0CALDAY) in the previous year, current year, next year. I´m not finding these variables in Business Content. Does anybody know any variable for this? If I gonna need to create a user exit for this, where should I put the result of the ABAP program?
    Thanks,
    David.

    Hello David!
    Yes, you must create user-exit variable for this.
    Go to transaction CMOD and find or create project with RSR00001 enhancement ("BI: Enhancements for Global Variables in Reporting"). After that edit ZXRSRU01 include in function EXIT_SAPLRRS0_001.
    Add to ZXRSRU01 code for you user-exit variable. For example:
        WHEN 'ZB_DATE_LASTMINUS1'.
          LOOP AT i_t_var_range INTO wa_range WHERE vnam = 'ZB_FISCYEAR_M1S'.
          ENDLOOP.
          n4 = wa_range-low.
          n4 = n4 - 1.
          CONCATENATE n4 '1231' into l_s_range-low.
          APPEND l_s_range TO e_t_range.
    in example ZB_FISCYEAR_M1S - variable for manual input on 0fiscyear characteristic.
    ZB_DATE_LASTMINUS1 - user-exit variable. calculate last day for input year - 1.
    Anton.

  • WebI Prompts using BEx Query Variables

    Hello,
    I have the following issues with WebI report selection input paramaters (prompts) that use BW BEx Query variables. Could anyone please assist?
    Issue 1:
    The WebI report has one mandatory and two optional input paramaters (all paramaters from BW BEx Query). When I execute the report via WebI rich client directly, enter the value for mandatory input parameter and leave blanks for both optional input parameters, the report ran OK and has no issue. However, when I ran it through CMC a strange thing happen: I could not select the value for mandatory input paramater as it requires to have values for both optional input paramaters first (which I wish to have them blank and optional). When I refersh values for the mandatory paramater, it says "List of Values for current prompt requires values for following prompts:...(ie. the two optional parameters).
    Anyone has any idea - it seems like it is a CMC issue for the WebI...
    Issue 2:
    Take the same WebI report above, the issue here is the order sequence of the prompts (ie. the selection input parameters). How can we change/control the sequence of the prompts? Whatever sequence of the varaiables (input paramters) in BW BEx Query, the WebI ignores it. Please advise.
    Thanks & Regards,
    Andy

    I did not see separate thread for issue #1, therefore I'll us this thread.
    I am running into similar issue when I get an error message ''List of Values for current prompt requires values for following prompts: <Name of the prompt>".
    We are using BO V4, SP2, Patch 10 with SAP BW as DB via BEx queries.
    I opened support ticket for this issue since obviousely it's still an issue after applying patch 10.
    It's not an issue when 'Rich Internet Application' option is selected to view report in 'Reading' mode (via Launchpad Preferences then Web Inteligence; defautl value for viewing is 'Web').
    I have not tried to use Client tools but even if it works with Client tools - it is not a solution for us. Our company does not plan to install client tools on end user computers.
    Bigger issue us is that report scheduling invokes Web version (not Rich Internet Application). Therefore we cannot schedule report that is giving us problem described. I tried scheduling report from Launchpad and from CMC and both game me error highlighted.

  • Query Variable Screen

    Good day,
    Is it possible to remove or protect the "Check" option on a standard Web Query variable screen.
    Thanks

    Hi.
    As I know it is impossible.
    Regards.

Maybe you are looking for