Cfselect bound to query w/o initial value?

Here's the code:
<cfinvoke component="Functions"
method="GetAllStewards"
returnVariable="AllStewards"
</cfinvoke>
<cfselect Name="NewSteward"
query="AllStewards"
display="FullName"
value="MemberID"
required="No"   
selected=" "
</cfselect>
Here's the problem:  The cfselect always "contains" the MemberID value for the first steward in the list.
Here's what I want:  If the values in the cfselect are not clicked, I want the value in NewSteward to be blank.  How do I do this?

Introduce a blank option, then use the attribute queryPosition to position the items from the query relative to the blank option
<cfselect  Name="NewSteward"
query="AllStewards"
display="FullName"
value="MemberID"
required="No"
queryPosition="below">
<option value="your_default_value"></option>
</cfselect>

Similar Messages

  • Query to set initial values

    Hi all,
    Is it possible to use queries to set initial values or change existing values?  For example, we are adding in a new sales employee that will be our sales rep for customers in a certain area.  Would it be possible to run a query that would set the Sales Employee field in the BP Master Data as this new sales rep if the customer is in that area?  If yes, what is the general process for using queries to set values in this manner (we have other things we would like to use this for as well, if its possible)?
    Thanks for the help

    Hi Todd,
    The best way to tackle this is probably to use a query to extract the business partners you wish to update and then use the Data Transfer Workbench to update the Business Partners in question.
    You could also add a Formatted Search to the Business Partner screen so all new Business Partners default to the correct Sales Person based upon territory/address or whatever criteria you like.
    Cheers,
    Sean

  • Why won't cfselect fill the initial value?

    I don't understand why the cfselect won't put in the initial value...
                 <cfif #URL.form_action# EQ "update">
                   <cfquery name="details">
                   GET STATE QUERY
                   </cfquery>
                   <cfselect selected="#details.state#" name="states" bind="cfc:_kpcfc_select.get_states()" bindonload="true" required="yes" message="Please select the state."/><span class="red">*</span>
                  </cfif>

    Dude that is the worst response ever.  I arrived at the forums after already reading this page: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_r-s_14.ht ml
    Actually I think it's pretty good advice.  There's nothing in your post to suggest you had already read the docs, and given the docs actually explain why what you're trying to do doesn't work, it's reasonable to assume you'd not read them.
    Clearly the selected attribute is what I am supposed to use, however it does not work.
    Well.  Hmmm.  You see the docs also say this:
    "This attribute applies only if selection list items are generated from a query."
    My emphasis.  Your <cfselect> is generated from a bind attribute, not a query attribute.  So that would be why it's "not working".
    FWIW, this restriction seems to have been lifted in CF9.  Not that that's much help to you, I imagine.
    Please someone suggest a solution other than retracing my steps.
    OK.
    Suggestion 1: if someone takes the time to try to help you, don't be rude to them, even if you don't like their suggestion.  It will not endear you to the people who are trying to help you, so you might find yourself not being helped.
    Suggestion 2: I guess one approach would be to knock together some JS that runs after the form has rendered which scans down the option collection until it finds the item you want selected, then select it.
    Suggestion 3: maybe just populate the select with a query instead of a bind.
    Adam

  • Initial Value in Enter Query Mode

    Hi Everyone,
    If you ever need to set a "visual" default (or initial) value for an item in Enter-Query mode, here is one solution to accomplish this:
    Create a WHEN-NEW-ITEM-INSTANCE trigger at the block level where the item is located. Make sure it can fire in Enter-Query mode.
    WHEN-NEW-ITEM-INSTANCE
    If :system.mode = 'ENTER-QUERY' AND :system.cursor_item = <YourItemName> AND <YourItemName> IS NULL Then
        <YourItemName> := <TheInitialValue>;
    End If;You may wish to play with the "Keep Cursor Position" property of the item should you want the cursor to go back to the item position it was when the item was left.

    It seems that your solution described solves my problem expressed 2 months ago....
    I'll try it out....
    Thanks......
    Sim

  • Set initial value based on query

    Is it possible to set the initial value of a field based on a query. Kindly advice.
    Regards,
    Careen

    Hi,
    Yes. You can create a VO for your query and map that to the field on your page. Then execute the VO in PR method.
    Or if the field is not based on VO, you can execute your query in PR method using PreparedStatement. Then get the handle of the field and set its value to the value returned in resultSet of the query.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Initial values in query using multidimensional authorizations

    Hi,
    so far reading here through the topics helped solving my issues, but know I have a problem with displaying the initial values in a query using multidimensional authorizations. We use BI 7 and have to user the authorization check from BW 3.5 (rsr).
    Following situation:
    - We have a two infoobjects "CLUST" and "P_CLUST" referencing to the infoobject "M_COSTELM" and using the same hierarchies.
    - The user should either see a specific value of CLUST and all values of P_CLUST or a specific value of P_CLUST and all values of CLUST in the reports. The values of CLUST and P_CLUST he's allowed to see are the same.
    - The role is declared as following:
    CLUST: * + P_CLUST [] + auth.object for CLUST
    PCLUST: * + CLUST [] + auth.object for PCLUST
    - Only one of those two infoobjects has to be set with a value in the query.
    Using the role as above and running a query, the rights management is working fine and the user only see's what he's allowed to.
    But when the user open's the query he see's the whole hierarchie in the inital values on the left and not only those nodes and leafs he should see.
    For example:
    Hierarchie "costelm_hier"
    ALL_NODES
    - FIRST NODE
       - FN_LEAF 1
       - FN_LEAF 2
    - SECOND NODE
      - SN_LEAF 1
      - SN_LEAF 2
    The user is allowed to see the FIRST_NODE and it's leafs in CLUST and P_CLUST.
    When he now open's a query with CLUST as the input-ready infoobject, in the initial values he see's the whole hierarchie and not only the FIRST_NODE with it's leafs.
    When then browsing through the tree and selecting the FIRST_NODE, in the query, the restrictions are working fine. He can see the FIRST_NODE in the infoobject CLUST and every values in P_CLUST. Also vice versa.
    As it's more user-friendly I only want the user to see the nodes and leafs he's has in his role.
    I also tried using an exit variable with the function 'RSSB_GET_AUTHS_FILTERED', but without success.
    Hope u understand me so far!?
    Thanks for your support!

    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Error: Missing initial value for session parameter

    Hi,
    I'm facing a problem while running the ETL process for Complete 11.5.10 Execution Plan in DAC Client. Some tasks are getting failed beacuse of the following error:-
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: VAR_27026 [Error: Missing initial value for session parameter:[$DBConnection_OLAP].].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6270 [Error: Variable parameter expansion error.].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6163 [Error initializing variables and parameters for the paritition.].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6226 [ERROR:  Failed to initialize session [SDE_ORA_Product_Category_Derive_Full]].
    ERROR : LM_36320 [Mon Nov 19 21:02:08 2007] : (2108|2632) Session task instance [SDE_ORA_Product_Category_Derive_Full]: Execution failed.
    When i checked the parameter file i can see the value assigned to the $DBConnection_OLAP. The same tasks ran successfully when i ran the ETL process for Complete 11.5.10 for the first time. I did not change anything after that and also all these are came built-in with the installation of Oracle BI Applications.
    Please anyone give me an idea what is causing the problem.
    Thanks,

    in DAC > Run History > Task Details, query
    Name = SDE_ORA_Product_Category_Temporary
    Open Status Description, look for string -lpf, the file after it is the actual parameter file DAC send to INFA server. E.g
    -lpf D:\DACTOPUS\Informatica\parameters\SDE_ORAR12_Adaptor.SDE_ORA_Product_Category_Temporary.txt
    Open the parameter file, most likely the [session_name] does not match with SDE_ORA_Product_Category_Derive_Full or some parameters are missing.

  • Initial value for a dropdown box

    Hello all,
    I have created a web template in the WAD (BI 70) with a dropdown box on a characteristic. A chart is displayed based on the query result. My query is built on an infoset.
    My problem is to populate the filter with an initial value and still let users change the characteristic value in the dropdown (all values for the characteristic is not acceptable in the context) . Also, I don't want the variable screen to show up.
    What is the best approach to achieve this?
    Thanks,
    JL

    In Query Designer you put in your default value in the area to the right in the first pane..
    If you put it on the left hand side, the filter will not be changeable.
    Hope this helps.
    Can give more presise answer if you need it.

  • How to use bind variable value of one VO as initial value for other VO row?

    JDeveloper 10.1.3.3, ADF Faces, ADF BC
    Hi,
    I have two View Objects: one read only with several bound variables and another editable entity based. Correspondingly there are two ADF Faces pages: first contains search form based on the read-only VO and second create form based on the editable VO. The search form has several hidden fields for some of bound variables because they aren't edited directly by user. These fields are updated with PPR when user selects other search criteria from LOV.
    There is a command button in the first page that navigates to the second form. Is there any way to transfer values of bound variables from the first VO to the second VO as initial values of the new row?
    I tried to set custom controller for the second page and retrieve search criteria values from request parameter map but values from hidden fields are missing. I think because that these fields are updated by PPR. Of course I can add custom action method to the navigation button and in the method put these values to request parameter map but I hope there is better solution.
    Thanks,
    Marius

    To summarize, given a bind variable value for one VO, on creating a row in a second VO, for 1 of the attributes of the second VO, you want to use the first VO's bind variable value. Correct?
    A potential solution ADF BC driven:
    1) Ensure you have an AppModuleImpl for your AM
    2) Ensure you have a ViewImpl for your 1st VO (where the bind variable will exist) - lets refer to that VO as "Alpha"
    3) Ensure you have a ViewRowImpl for your 2nd VO (the one you want to default the value in) - lets refer to that VO as "Beta"
    4) For your first VO "Alpha" create the bind variable (say pValue)
    5) In your second VO "Beta" ViewRomImpl add following code:
    @Override
    protected void create(AttributeList attributeList) {
      super.create(attributeList);
      AppModuleImpl am = (AppModuleImpl)this.getApplicationModule();
      String someValue = am.getAlphaView1().getpValue();
      setSecondVOAttr(someValue); // change this code to whatever your setter is for the field you want to initialize.
    }Hope this helps. Let us know how you go.
    Regards,
    CM.

  • Setting null values vs Default or initial values in the Database?

    i am working on a system and i have set any field that might optional as Allow Null,, but this is causing me a lot of troubles especially when i am querying the data or perfoming some calculations from the database. So is it valid if i changed all the Allow null field to have initial values an restricting null values to be inserted into them, so example, to set the initial values for an integer to be 0 and string to be empty?

    Hi,
    You can implement business logic on db side or on app side.
    Advantage and disadvantage of implementation business logic on DB side.
    Advantages:
    1.Don't require app server software version changes/compilations (Java, C, C++, C#...)
    2.Stored procedures are stored directly in the db.
    3.DBA can manage and optimize the stored procedures in flexible way; it'll be transparent for app server because the same remaining interface.
    4.Avoidance of network traffic - the stored procedures can run directly within DB engine.
    5.Encapsulation of business logic as API in the database.
    6.Reports can be implemented like PL/SQL functions that return table data type. The functions can be called from application side - sort of API.
    Disadvantages:
    1.DB vendor specific, but when dealing with the same databases (for example Oracle) it's not relevant.
    2.Require DB skills to write the procedures correctly: it will require time for a pure java/c/c++/c# programmer to understand the DB code and to write it in optimal (from db point of view) way.
    3.If it's too complex business logic - the db side implementation can become too complex.
    To overcome issue with null(s) please use NVL function.
    Example:
    drop table  TEST_TABLE;
    create table TEST_TABLE(parameter varchar2(20), val number(10, 2));
    insert into TEST_TABLE values ('A', 23.245);
    insert into TEST_TABLE values ('B', null);
    insert into TEST_TABLE values ('C', 123);
    insert into TEST_TABLE values ('D', null);
    select avg(nvl(val, 0)) from TEST_TABLE;Hope this will help.
    Best Regards,
    http://dba-star.blogspot.com/

  • The validity interval has the initial value as lower limit

    Hi Friends,
    When i was executing a query on Multiprovider,
    got an error like
    "The validity interval has the initial value as lower limit"
                 Actually The multiprovder has been built on two infocubes 0CFM_C10 & 0CFM_C11, in those 0CFM_C10 contains the non-cumulative values.
                Even i've checked the query also in query designere it is saying like the query is correct, in that query we are using Key Date...
    please help me onthis, awaiting for your answers
    thanks in advance

    Hi you can try using inial at the update rules

  • # instead of initial value in reports

    Hi,
    I'm trying to solve the following problem: When I create a report in Query Analyzer, in some columns, instead of the initial value(spaces) for some fields, there is the  # sign.
    Do you know from where does this issue come from? Is there an option inside the query analyzer to suppress this?
    Thanks in advance,
    George Ardeleanu

    Hi George,
    This is the default property of reports in BW. You see # instead of blank values in the data targets.
    Are you using WAD (Web Application Designer) in your scenario. If yes, there is a solution to remove these #es from the report output. You just need to add a small html script in the html tab of the WAD.
    Regards,
    Yogesh

  • LOV Initial value on Parameter form

    Hi, I am new to Oracle Reports so I hope this is not a lame question.
    I have a drop down list on my parameter form based on a select query. My problem arises when I run the report, I would like the list to display a blank value as the initial value rather than the first value returned by the select statement. Does anyone have any ideas?

    You could always do something like:
    select ename from
    (select null ename from dual
    union
    select ename from emp)
    order by nvl(upper(ename), 'A')

  • WEB DYNPRO ALV GRID : CELL CONTENT - Initial Value

    I created a sort of 'Timesheet' in web dynpro...
    Unfortunatly, for all days of the month it displays '0.00' as initial value...
    Is it possible to not display this initial value or display space/empty ?
    In gui alv it is possible, I don't know if it could be done in web dynpro

    Hi,
    For the node to which the ALV is bound. For the column (context attribute) check the property of the attribute check the formatting propertioes as ZEROS AS BLANKS
    for ex: price is the context attrbiute check the properties.
    This FORMATTING options for the context attribute is found in the latest verions like EHP4.
    Regards,
    Lekha.

  • Initialized values for Init blocks disappear at random

    Hi everyone
    I have a strange scenario and would appreciate your help with some ideas on how to troubleshoot this.
    We have OBIEE 10.1.3.4. It is a BI Apps 7.9.6.1 environment and OBIEE is integrated with EBS. Everything is working 100% fine and all initialiation blocks are initialized succesfully. Now iit has happened a couple of times that the init blocks seems to "lose" their initialized values. For example, CURRENT_FISCAL_YEAR will be initialized to 2011. Then out of the blue, next time you log in this init block has the value of 2008, which is the default initializer. The servers are all up and there are no errors.
    Any ideas about what is going on here?
    Thank you

    Check the SQL query in init block.It will take default value if SQL query does not fetch any record.
    I guess you have created a repository variable.
    Regards,
    Sandeep

Maybe you are looking for

  • Mavericks upgrade

    Unable to install Mavericks on my Mid 2010 MacBook Pro running Mountain Lion. Stalls when rebooting. I must restore from external backup. I have attempted this 4 times since Oct 2013 when I download the update.Each time the same thing happens. Anyone

  • Mavericks clamshell mode stopped working

    I have a summer 2007 15 "MacBook Pro and since upgrading to mavericks clamshell mode doesn't work anymore. Now closing the lid doesn't do anything and the laptop screen stays on and the computer doesn't sleep. I saw a blog entry which gave a terminal

  • Common Linex & vi  commands for DBAs

    Can some body forward me the everyday linex & vi commands for DBAs ...

  • Work Flow - Suggestions, tutorials, or Books

    Hello All, I've been teaching myself AE, as well as Ps, Ai, and Pre Pro. (Creative Suite 4)  I'm somewhat comfortable with a couple of the applications but by no  means a master of any.  However, I think that its takes me too long to  do some things,

  • NWEngine function for date

    Is there a list of nwengine functions anywhere?  I take it to be a VBscript capable, but there's no guide on how to get it to do simple things like date and time in any of the sample scripts.  It is unable to resolve the %date% and %time% variables,