Prompts with dynamic default values

I have a request from my client to modify several reports so that two date prompts will have default values populated with the first and last day of the previous month.  All of the reports are currently using custom sql so I have to be able get the dynamic default value in the extended @prompt syntax.  However, I am not able to use any of the sql functions since the functions merely appear as plain text as the default value itself. 
I have found a few work arounds to achieve the functionality of the dynamic prompts, but I cannot get the actual default value displayed to the user to be dynamic.  Is it possible to achieve this by using only the custom sql?

Hi Sandeep ,
Below blog may answer your query .
Dave’s Adventures in Business Intelligence » Dynamic Dates Part III: Monthly Date Ranges
Search for And for Last Month?

Similar Messages

  • XML FORM  -  How to save read-only controls with a default value

    Hello everybody,
    I have a 3 xml forms, each one to create one type of news. I need to use 3 because each of this forms has their own controls. But the control which indicates the type of news (asociated with a KM Predefined Property) must be common in the 3 forms, in order to use it on searches.
    The question is, how can I include in this forms a control:
      - Visible for the user
      - With a default value defined in the control properties (each form has a different value, corresponding with the type of news)
      - Read-only mode
      - The value showed in the control must be saved in the associated KM Predefined Property when the user clicks the Save button. 
    Anyone knows how to do this?
    What control can I use?
    I was thinking of trying with text boxes, but I don't find the way to make them unwritable (Read only mode).
    It is posible using labels?
    Thanks.
    Kind regards

    Hello Jose,
    I know you responded with a question... I see it in the email, but I don't see it here!  Very odd... but in response:
    The first thing I do when I open the Edit.xsl file is do a 'find' for the name of the text field that I want to be read-only (in my test case, it's 'location').  Repeat the find until you see something like:
    [code]<!--
    field location
    -->[/code]
    Below there is where I put the new code.  Mine looks like this:
    [code]- <xsl:choose>
    - <xsl:when test="location='' and ($editmode='create')">
    - <xsl:choose>
    - <xsl:when test="./xf:ValidationError/@tagname='location'">
    - <input name="location" size="30" type="text" class="urEdfiTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="tabindex">
    - <xsl:choose>
      <xsl:when test="$accessibilitymode='true'">21</xsl:when>
      <xsl:otherwise>3792</xsl:otherwise>
      </xsl:choose>
      </xsl:attribute>
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:when>
    - <xsl:otherwise>
    - <input name="location" size="30" type="text" tabindex="3792" class="urEdfTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:otherwise>
      </xsl:choose>[/code]
    I put the <xsl:attribute name="readonly"> in both places (when test, and when not test).  I'm not entirely sure if that's necessary, but that worked for me.
    Hope this helps,
    Fallon

  • Dynamic default values in parameters

    Hello,
    anyone knows if it's possible to set dynamic values as default values for parameters in portal?
    i am specially interested in the use the date we are in to pass it to a discoverer worksheet (month or year) via single parameter form or any other porlet that could perform it.
    Many thanks.
    Regards,
    Daniel
    PS
    Is the second thread i create with this question cause i didnt receive any answer before and i am really interested in any solution or knowing that i cant perform it.

    no one have ever used a date parameter (for example, month) that need a default value, and set this default value as the month we are today?
    maybe i didnt explain my problem properly before...
    thanks for any help, i really need this because all the porlets in the portal i am creating are discoverer's reports that presented by month, year or day.
    regards,
    daniel

  • Field with a default value from another field

    I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
    Topic
    Acrobat 5 - field with default value of another field
    Ben PF - 03:31am Mar 23, 2007 Pacific
    How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
    I've tried, but I just can't figure it out!
    Any help much appreciated.
    Ben
    | Back to Topic List | Bookmark | Subscribe
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages
    2 messages. Displaying 1 through 2.
    First Previous Next Last Show All Messages
    Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
    This, or some variation of this, should work:
    if(this.getField("date2").value == ""{
    this.getField("date2").value = this.getField("date1).value;
    | Bookmark back to top
    Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
    Thanks very much.
    I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
    Thanks for your help.
    Ben

    Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
    Put this:
    this.getField("myField2").value = event.target.value;
    Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
    I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

  • Setting dynamic default values in a list/menu

    To save problems with inserting dates into a Mysql database, I have split the input fields on the file insert form into three drop down lists containing the day, month and year.
    In order to make it easy for users, I wish to take the current date, split it into day (dd) month (mm) and year (yyyy), and use one of these values as the default option for each of the three fields.
    In html you would use :
    <option value="2012" selected>2012</option> for the default, but this is a fixed default.
    I want it to change depending on the actual year., so that if today is 21-02-2012, (thats how we use dates in the UK)  the three fields default to 21 (dd) 02 (mm)  2012 (yyyy).
    I can re-format them into MySql date format mmddyyyy no problem later to insert them into the database
    Any ideas?
    Or is there a better way to do this?

    <option value="2012" <?php if (date('Y') == '2012') echo 'selected'; ?>>2012</option>
    The above solution works well for that item.
    I now have another one which may help others.
    I populate a drop down list with the values 1 to 12, with the default being set to 6 and insert a record.
    This represents the number of months that the record will be displayed until it is deleted.
    When I pull the record back from the database to update it, I need to show the current value of the field, which is stored in $row_eventset['event_expiry'] ready for it to be updated.
    Code as follows:
    <select name="event_expiry" size="1" tabindex="5" title="select from the list">
    <?php for ($i = 1; $i <= 12; $i++) { // loop through the months
              echo "<option value= '$i' " ;
          if ($i == $row_eventset['event_expiry']) {                               //check if this is the same as the record being edited
           echo 'selected="selected" ' ;                                                 // if so select it
                echo ">$i</option <br>";                                                  // the <br> is essential in a browser, though it works without it in live view.
    ?>
    </select>
    I hope that it saves someone some time.
    When I first tried this, it worked fine in live view. However in a browser, all the months appeared on the same line. I had to insert the <br> command to make it work properly.

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • Dynamic default value to dateTime filter

    Hi,
    In my report I want to show data with *"datetime>4 AM today to datetime<current datetime"*. How to set the default value of a datetime filter to 4AM of the current day?
    Thanks
    Edited by: SOADreams on Sep 22, 2011 12:43 PM

    Hi
    You could try the following:
    Create a calculated field to determine if the Hour is 4AM or greater -- use the timefunctions and set the value to 1 for fields that satisfy the criteria using If then Else
    Set the filter to Current Day and then also where the calculated field is 1
    I think this will provide you the right set of records.
    Regards
    Payal

  • XControl dynamic default value

    Hello,
    Do you know how to make a XControl give a numeric value like Tick Count (ms) ? I think that is not that obvious. Tick Count is typically a node which value changes at every moment based on external parameters.
    See the attached example. When a VI containing the XControl is "Run when opened" then the returned value is always zero, instead of Tick Count. This is related to the default value of the XControl data extracted on the Block Diagram before the Facade VI is called. Note that I need to use a XControl for other reasons, not a SubVI for instance or else.
    Does anywone know how overcome this zero systematic value (still using a XControl) ?
    Best regards
    LabView 8.6 - Windows XP SP2
    Attachments:
    XControl.TickCount.zip ‏39 KB

    MaximeR wrote:
    Hello,
    You can
    remark that when the VI was load one time and that you don't close LabVIEW, you
    can reduce the delay because the Xcontrol is already in memory. But you need to
    keep a delay due to the redrawing of the Xcontrol. When you use a lot of
    Xcontrol or a big one, it's better to preload the xcontrol before using it to
    reduce the launch time.
    Best regards.
    OK enlighten me, how to do such a thing for an executable. Why can't the owning VI wait on the XControls?
    Ton
    PS if you are  into debugging XControls contact NI Netherlands for the code on SRQ  682340
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Crystal Report XI: Parameter Field Dynamic Default Values Limitation?

    Post Author: Elie_123
    CA Forum: General
    Hi,Using Crystal Report XI.I have a parameter field with Dynamic values that Queries the company field of an SQL Database.I have around 3500 companies in my DB. But when running my report (Using Crystal), only the first 1300 companies are being displayed in my pick list.I need to see the whole 3500 records. Any idea how to fix that?regards

    Post Author: V361
    CA Forum: General
    Check out this link
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do;jsessionid=2DA9FC849962062053477D134AAAA672?cmd=displayKC&docType=kc&externalId=c2017238&sliceId=&dialogID=5618074&stateId=1%200%205616180

  • Apex_item select list to be displayed with multiple default values

    I am using APEX 4.2.
    For one of our requirements , we are displaying a report which uses "apex_item.select_list_from_query" multiselect field.
    The above function accepts a parameter, 'p_value' using which we can specify the default value to be highlighted.
    Is there any way to highlight multiple values on the select list by default, when the page is loaded, based on a sql output.
    Sample Scenario:
    Say colour is a multiselect field. Full list of values available : R, B, G, Y, O
    On day1, for record1 i am choosing R and B. which I am saving in the backend when the page is submitted.
    On day2 : I login again to see the report. When the report is loaded, I should see the values 'R' and 'B' highlighted or in a different font format , differentiated from the rest.
    Thanks in advance for your replies.
    Regards,
    Raasi
    Edited by: 878815 on Mar 11, 2013 10:23 PM

    878815 wrote:
    I am using apex_item.select_list_from query. and then a piece of javascript to concatenate as a colon delimited string. This is the function I am using in the report sql,
    apex_item.hidden(20,null)||apex_item.select_list_from_query(6,null,'<sql>','multiple size = "6" onChange="Multi(this)"','NO' ) as col_1I think 'multiple size' is a custom attribute and APEX have no clue about it.
    javascript code:
    function Multi(p_this)
    var l_selected=html_SelectValue(p_this);
    if (l_selected.constructor == Array) l_selected=l_selected.join(':');
    p_this.parentNode.firstChild.value = l_selected;
    return l_selected;
    };What is this apex_item.hidden used for.. placeholder?
    May be populate the hidden item with default value as colon delimited string and on page load use some JavaScript to read that string and set/highlight the select list.
    It would be easy if you can replicate the issue on apex.oracle.com

  • Use system console with editable default value

    Hi,
    Is it possible in java (or maybe groovy) to ask user for input in console with default value passed? User should be able to edit the default value or commit it by pressing enter key.
    Sample:
    <CONSOLE> Enter type: TYPE1<cursor>
    if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?

    Opal wrote:
    if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?For java it would need to look more like the following
    <CONSOLE> Enter type[enter for default 'TYPE1']: <cursor>
    I suspect that generally users will not be editing the default, so although you can't do it, it isn't much of a loss.

  • Dynamic Default value of variable in query

    Hi,
    I would like to set current date as default value (e.g. system date 'SY-DATE') for a variable on selection screen in query. How to do that?
    Thanks,
    Helen

    Hi helen,
       Check this doc : <a href="http://sapbwneelam.blogspot.com/2007/10/how-to-create-populate-user-exit.html">How to... Create & Populate User Exit variable</a>
    Hope it Helps
    Srini

  • Dynamic default value on SREQ area

    Hi everybody,
    I would like to set default value for one field on search screen,
    however not fixed value (what I can do in field group of the area),
    but dependent on some condition.
    Where should I put my code?
    regards,
    Przemek

    Hi,
    Default values are the ones that appear when the screen loads. So what kind of condition can you check when the screen loads. Incase of any events driven out of navigation then we can set some values.
    Could you make the requirement a little more clear.
    Regards,
    Hemanth

  • Runtime error with column default value settings

    I have one SP2010 (enterprise) document library which gives me a runtime error if I click on "column default value settings" in the settings. Other document libraries' column default value settings are working fine. I use managed metadata
    and created libraries from templates. I deleted all custom columns from the site, only title is left over (content types are document and link to a document) but runtime error still shows up. How can I fix this?
    Server Error in '/' Application.
    Description:
    An application error occurred on the server. The current custom error
    settings for this application prevent the details of the application error from
    being viewed remotely (for security reasons). It could, however, be viewed by
    browsers running on the local server machine.
    Details: To enable
    the details of this specific error message to be viewable on remote machines,
    please create a <customErrors> tag within a "web.config" configuration
    file located in the root directory of the current web application. This
    <customErrors> tag should then have its "mode" attribute set to
    "Off".
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>
    Notes:
    The current error page you are seeing can be replaced by a custom error page by
    modifying the "defaultRedirect" attribute of the application's
    <customErrors> configuration tag to point to a custom error page
    URL.
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>
    Runtime Error

    Thanks for your suggestions. I found the log but don't know what it means. Can anybody help?
    System.ArgumentOutOfRangeException:   startIndex cannot be larger than length of string. Parameter name: startIndex  
      at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length,   Boolean fAlwaysCopy)
      at   Microsoft.Office.DocumentManagement.MetadataNavigation.PerLocationViewManager.HumanReadablePath(SPList   list, Guid fieldId, String uniqueNodeId, String pathDelimiter)
      at   Microsoft.Office.Server.WebControls.MetaDataNavTree.TreeViewDataBound(Object   sender, EventArgs e)
      at System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e)
      at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
      at   Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationContext.OnTreeViewLoad(SPTreeView   spTreeView)
      at Microsoft.Office.Server.WebControls.MetaDataNavTree.PerLocationPageLoad()
      at   Microsoft.Office.DocumentManagement.Pages.ColumnDefaultsPage.OnLoad(EventArgs   e)
      at System.Web.UI.Control.LoadRecursive()
      at System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

  • Choice field with no default value

    I have a field in a list that is a multiple select check box field and do not want to have a default value in InfoPath form.  I have searched and tried using blanks and different calculated formulas and have struck out.  Any ideas?  Thanks!
    David

    Try below:
    http://social.msdn.microsoft.com/Forums/en-US/6a2b4230-49e2-45a4-96d3-c2539d35d78c/infopath-dropdown-list-select-some-value-by-default?forum=sharepointcustomizationlegacy
    http://geekswithblogs.net/KunaalKapoor/archive/2012/06/26/infopath-dropdown-remove-clear-blank-rowitem.aspx
    Regular Dropdown (Pulling from DataSource)
    1. Double click on dropdown field in the data
    source.
    2. Select Fx button for Default value.
    3. Select Insert field or group.
    4. Select secondary xml from data source.
    5. Select “value” and click on ok.

Maybe you are looking for

  • JBO-26080 error during commit

    Hi, I am getting a JBO-26080 error attempting to commit a view using the Business component browser. The error is: (oracle.jbo.DMLException) JBO-26080: Error while selecting entity for Bank The view, entity and stack trace are below. Any insight appr

  • Is there a way to remember directory on Final Cut export?

    Every time I go to export a clip, it starts at the root directory.  I have to navigate down to the folder where I'm exporting.  Is there a way for it to remember where I'm saving the clips?

  • How do I change the price of my podcast?

    I need to know how to change the price of my podcast.

  • Cannot pass String by reference !

    I have the same problem. I understood that if you pass "jxxxarray" or "String" they are passed by reference but I could not make it working. Here are the 2 parts of my code: JAVA (The call to native function): String toto = new String("toto"); int na

  • Really basic query

    Hi, I am a novice. I can't figure out what (+) means when it appears in statements like this: (the below statement is only representative) select b.f_user_id, a.amount from t_accounts a, t_users b where a.f_user_id(+) = b.f_user_id and what abt selec