Sum / Format on APEX_ITEM.TEXT columns

Hi! I have two questions :
In apex 3.2, on an updateable report, I am using APEX_ITEM.TEXT for a column.
1) The data contained in this cell are hours (so numeric and the sum should work). I am not able to get a sum on this column. I am checking the "sum" field in the report attributes. All in can see is the last line with "0" in it.
Anybody has an idea on how to have the sum on this column?
2) How can I have a format on the APEX_ITEM.TEXT column ? I tried to put 90D0 in the number/date format but it does nothing.
Thanks!
Amelie
Edited by: user13485643 on Feb 8, 2011 12:30 PM

Sorry, it was long before I answer.
First of all, thank you so much for your idea! I am now able to get the sum dynamically! Here's how :
I created this javascript function. The variable myName is the name of the inputs and myHeader is the value you get in the td tag <td class="t20data" headers="HrsDim">
function updateSum(myName, myHeader)
     myArray = document.getElementsByName(myName);
     mySum = 0;
     for (var i=0; i < myArray.length; i++)
          val = myArray.value
          if (val == Number(val)){
               mySum = mySum + Number(val);
     $('td[headers=' + myHeader + ']').last().text(mySum).addClass("sum");
In my apex item's attribute I added this :onchange="updateSum(this.name, 'HrsDim')"
Works like a charm!!
Thanks again!!!
Edited by: Amelie on Feb 17, 2011 8:06 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Tabular form with uneditable apex_item.text column

    When I use the following query for my Tabular Form I have the AGE column uneditable
    select
    "ID",
    "ID" ID_DISPLAY,
    apex_item.text(44,"AGE") as "AGE"
    from "#OWNER#"."SAS_TEST"
    I changed the AGE column type to Standard Report Column but still the column values are not able to update the values.
    The column will show the HTML input and view the correct values from the table but you can not update the column.
    I have apex 4.0.2

    I found the solution. You must have both the original column in your sql (as hidden type), and you must add the APEX_ITEM.TEXT with an alias different than the true db column name.
    In order to set the hidden real column values after submitting the page, add the page process pl/sql below. Of course you need to find the g_fxx number by looking at your page source. This will transfer the values from one pl/sql table to the other which is mapped in the MRU process.
    On Submit - Before Computations and Validations
    BEGIN
    -- Database Column Name: DEFAULT_VALUE
    -- Set the hidden DEFAULT_VALUE field for all visible records to null
    -- Note: g_f19 maps to the hidden DEFAULT_VALUE column
    -- g_f30 maps to the visible DEFAULT_VALUE_ADMIN column
    FOR ii IN 1 .. APEX_Application.g_f19.COUNT
    LOOP
    APEX_Application.g_f19(ii) := APEX_Application.g_f30(ii);
    END LOOP;
    END;

  • Refresh APEX_ITEM.TEXT Value when Interactive Report Page Changes

    I use an APEX_ITEM.TEXT column in an IR where the user can enter some number date.
    to make this data persistent while paginating the ir, i use some DA . Via ajaxthis DA call an onDemandProcess to save the entered data in a collection.
    works great; the input is stored in the collection.
    To show the already entered data, the ir sql statement joins the collection.
    select  APEX_ITEM.hidden(2,artikelnr)||
            APEX_ITEM.TEXT(1
              ,COL_artikel.preis
              ,3
              ,3
              ,'autocomplete="off" onfocus="javascript:f_set_last_val(this);" onchange="javascript:f_validate_integer(this);"'
              ,'INPUTBESTELLEN'
             ) Inputbestellen,
    article.*
    from article
    left outer join COL_artikel on COL_artikel.nummer = artikelnr where col_artikel is a view for better access on the collection
    Now the issue:
    On the first Page i add some data, then i go head to page 2 and 3 of the ir. The collection is filled withe the entered data.
    But when i navigate back to page 1 the entered data is not shown in the input field unless i relload the whole page . I guess because the query is not re-executed when paginating foreward/backward.
    ist there any way to overcome this tiny small issue?
    regards
    peter

    It looks like you are trying to combine apex_item function with a standard tabular form and as far as I know this won't work. You will need to create a manual tabular form in that case. See this and other examples as a refference:
    http://htmldb.oracle.com/pls/otn/f?p=31517:170
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Column alignment with apex_item.text

    I am trying to create a tabular form with the following statement
    select apex_item.text(10,empno) empno,
    apex_item.text(20,ename) ename,
    apex_item.text(30,sal,15,15) sal,
    apex_item.text(40,comm) comm
    from emp
    The statement above works fine, however, if I try to align the sal column by adding style for the p_attribute parameter such as
    apex_item.text(30,sal,15,15,style="text-align:right;") sal
    I get the following
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00907: missing right parenthesis
    In addition to the column alignment I would like to format the column like $999,999.99 and provide a column total at the bottom, is this possible with apex_item.text?
    Any thoughts would be most appreciated
    Regards,
    Mark

    Hi,
    You could try using TO_CHAR(sal,'$999,999.99') but I'm not sure what that may do to the submit process - I tend to leave the number unformatted and only use formats for reports.
    If you are able to add in formatting, it may actually make it a lot harder to provide totals. A total could be done by looping through the input items that have a name attribute of "f30" (as you've used 30 for the index number of that item) - using parseInt() or parseFloat() javascript functions would convert the strings into numbers, but the commas and currency symbols would stop this working.
    Andy

  • APEX_ITEM.TEXT and solution for enabling and dispabling a button

    Hi All,
    Please let me know how can we have a format mask for an Item created using apex_item.text.
    I would like to add a Number format mask with three decimals in this report column
    APEX_ITEM.TEXT (2, INV_VALUE, 15, 20, 'readonly=readonly style=""')
    Also do let me know the following points based on the followup to this link:
    Use of Checkbox in Report for calculation and determine checked records
    1. How can I enable or disable a button based on value of a Page Item being > 0, this also should be done when a check box is checked or unchecked.
    2. One more clarification about adding the total depending upon check box checked or unchecked.
    On checking and un-checking the total gets added and subtracted as required, but I have noticed that the the session values of the Item for Total is not as the one displayed. Why is it so. Please guide.
    Thanks & regards
    Arif Khadas

    Hi Vee,
    Thanks for the reply.
    document.getElementById(...)' is null or not an objectCheck if the button is rendered with id="PAY_DUES"+ or not. You can view the HTML source code of the button and see if it has such an id or not. The source code is as follows:
    <a href="javascript:popUp2('f?p=1002:23:3713834878987986::NO::P23_INVOICES,P23_RCP_AMOUNT_PAID:,0', 320, 450)" class="t20Button">Pay Dues</a>
    Else add an id attribute to the button in button attributes(ensure that you have the BUTTON_ATTRIBUTES substitution string used in the button template)Template of button is as follows and the Substitution String #BUTTON_ATTRIBUTES# is not Referenced.
    <a href="#LINK#" class="t20Button">#LABEL#</a>
    but I have noticed that the the session values of the Item for Total is not as the one displayedThe session value of the item is usually set when you submit the page or use an ajax process/ Dynamic Action to set it. If you this is required , set the item's session state calling a dummy/null ondemand process or a dummy PLSQL dynamic Action using the item name in the "List of items to Submit" field.This issue is resolved for me in other thread.
    Thanks & Regards
    Arif Khadas

  • APEX_ITEM.TEXT disable question

    Hello guys and girls,
    I have a small problem with my sql statement (last section as you can see below). In the query I am trying to generate an html text element that is either diabled or enabled. For some reason, my text fields are all disabled although int_prozent is not null in several cases.
    Do you have a hint for me how to solve that bug?
    {cod€}SELECT DECODE(STR_BA_KAT,'H',1,'N',2,'B',3) AS CS, STR_BA_LANG, STR_BA_KAT, STR_SELTEN, STR_BA_GRUPPE, CASE WHEN FLAG = 1 THEN APEX_ITEM.HIDDEN(1, CNT_TBL_MATRIX_INTERMEDIATE, 'disabled=true') ELSE APEX_ITEM.HIDDEN(1, CNT_TBL_MATRIX_INTERMEDIATE) END AS CNT_TBL_MATRIX_INTERMEDIATE,
    CASE WHEN FLAG = 1 THEN APEX_ITEM.SELECT_LIST_FROM_LOV(5, STR_GEWERTET, 'JEIN', 'disabled= true', 'class="combobox"') ELSE APEX_ITEM.SELECT_LIST_FROM_LOV(5, STR_GEWERTET, 'JEIN','%',
    '%', NULL,NULL, NULL, 'class="combobox"') END AS STR_GEWERTET,
    CASE WHEN INT_PROZENT is null THEN APEX_ITEM.TEXT(33, int_prozent, 10, null, 'disabled=true') else APEX_ITEM.TEXT(33, int_prozent, 10, null, 'disabled=false') end as INT_PROZENT FROM TBL_MATRIX_INTERMEDIATE_RESULT where FLAG != 1
    Any help is appreciated! Thanks a lot for your effort!
    Seb                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hello Jari!
    Happy new year and thanks for your hint. It worked well! disabled=disabled is suitable for input type text. For select lists it's disabled=true.
    One more thing though:
    When creating the html items (the text box) I am simultaneously assigning a format to my column and converting to char before.
    CASE WHEN INT_PROZENT is null THEN APEX_ITEM.TEXT(33, to_char(int_prozent,'FML999G999G999G999G990D00'), 10, null, 'disabled=disabled') else APEX_ITEM.TEXT(33, to_char(int_prozent,'FML999G999G999G999G990D00'), 10, null) end as INT_PROZENTThe problem is that my numeric values are displayed like the following example: ¿0,10. Do you know of a workaround?
    Many thanks again for your splendid and rapid help!
    Regards,
    Seb

  • Apex 4.2 Report region sql query with "apex_item.text" renders wrongly

    In APEX 4.2 page i have created region "Report data".
    Type="SQl Query".
    "User Interface"-->"Template"="Reports Region".
    "Region Source"="select apex_item.text(1, '111') as c1 from dual".
    Actually the select query is little bit more complex, but generally simplified it is such, that it uses function "select apex_item.text" to construct HTML textfield.
    If i run in Sql Developer query
    select apex_item.text(1, '111') as c1 from dual;Then result is:
    <input type="text" name="f01" size="20" maxlength="2000" value="111"  />But in APEX 4.2 the report is rendered so:
    <td  headers="c1">&lt ;input type=&quot ;text&quot ; name=&quot;f01&quot; size=&quot;20&quot; maxlength=&quot;2000&quot; value=&quot;111&quot;  /&gt ;</td>(for this forum to display correctly i had to put extra spaces between" &gt" and ";" and so on)
    And APEX 4.2 shows ugly html inside report cell/slot for me, displaying characters/symbols ">". The reason is that APEX HTML page source does not have symbol ">" but has " &gt ;" .
    In APEX 3 i have similar query working well, without such anomaly.
    What attribute should i change in APEX 4.2 region to display my query result as needed?
    I need that function "apex_item.text", i cannot remove it.
    Edited by: CharlesRoos on 13.02.2013 15:28
    Edited by: CharlesRoos on 13.02.2013 15:29
    Edited by: CharlesRoos on 13.02.2013 15:29

    CharlesRoos wrote:
    In APEX 4.2 page i have created region "Report data".
    Type="SQl Query".
    "User Interface"-->"Template"="Reports Region".
    "Region Source"="select apex_item.text(1, '111') as c1 from dual".
    Actually the select query is little bit more complex, but generally simplified it is such, that it uses function "select apex_item.text" to construct HTML textfield.
    If i run in Sql Developer query
    select apex_item.text(1, '111') as c1 from dual;Then result is:
    <input type="text" name="f01" size="20" maxlength="2000" value="111"  />But in APEX 4.2 the report is rendered so:
    <td  headers="c1">&lt ;input type=&quot ;text&quot ; name="f01" size="20" maxlength="2000" value="111"  /&gt ;</td>(for this forum to display correctly i had to put extra spaces between" &gt" and ";" and so on)
    And APEX 4.2 shows ugly html inside report cell/slot for me, displaying characters/symbols ">". The reason is that APEX HTML page source does not have symbol ">" but has " &gt ;" .
    In APEX 3 i have similar query working well, without such anomaly.
    What attribute should i change in APEX 4.2 region to display my query result as needed?Ensure that the Display As Column Attribute for the C1 column is Standard Report Column.

  • SharePoint 2013 search analytics reports - 'query text' column value is empty in 'top queries by month' report

    Hi,
    We are using ContentBySearchWebPart to facilitate search through the site.
    We have used display template to format the results. We are deploying the web part on the desired page through a feature. We have below markup for web part in the elements.xml file to add the web part -
    <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
    <metaData>
    <type name="Microsoft.Office.Server.Search.WebControls.ContentBySearchWebPart, Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
    </metaData>
    <data>
    <properties>
    <property name="StatesJson" type="string">{}</property>
    <property name="UseSharedDataProvider" type="bool">False</property>
    <property name="UseSimplifiedQueryBuilder" type="bool">False</property>
    <property name="QueryGroupName" type="string">f5646507-4a7a-4d75-b5c4-d435b9128e2a</property>
    <property name="LogAnalyticsViewEvent" type="bool">True</property>
    <property name="SelectedPropertiesJson" type="string">["Title","Path","Description"]</property>
    <property name="PropertyMappings" type="string" />
    <property name="ShowAdvancedLink" type="bool">True</property>
    <property name="NumberOfItems" type="int">10</property>
    <property name="EmitStyleReference" type="bool">True</property>
    <property name="ShowPreferencesLink" type="bool">True</property>
    <property name="ServerIncludeScriptsJson" type="string">null</property>
    <property name="IncludeResultTypeConstraint" type="bool">False</property>
    <property name="Height" type="string" />
    <property name="MaxPagesBeforeCurrent" type="int">4</property>
    <property name="ResultType" type="string" />
    <property name="ShowDidYouMean" type="bool">False</property>
    <property name="StartingItemIndex" type="int">1</property>
    <property name="AlwaysRenderOnServer" type="bool">False</property>
    <property name="GroupTemplateId" type="string">&#126;sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Group_Content.js</property>
    <property name="ResultTypeId" type="string" />
    <property name="ItemTemplateId" type="string">&#126;sitecollection/_catalogs/masterpage/Display Templates/Search/Item_LearningGroup.js</property>
    <property name="AllowConnect" type="bool">True</property>
    <property name="HelpUrl" type="string" />
    <property name="ResultsPerPage" type="int">10</property>
    <property name="RenderTemplateId" type="string">&#126;sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/ListWithPaging.js</property>
    <property name="AllowEdit" type="bool">True</property>
    <property name="AllowZoneChange" type="bool">True</property>
    <property name="AddSEOPropertiesFromSearch" type="bool">False</property>
    <property name="AdvancedSearchPageAddress" type="string">advanced.aspx</property>
    <property name="HitHighlightedPropertiesJson" type="string">["Title","Path","Author","SectionNames","SiteDescription"]</property>
    <property name="TitleUrl" type="string" />
    <property name="EmptyMessage" type="string" />
    <property name="ShowBestBets" type="bool">False</property>
    <property name="ShowViewDuplicates" type="bool">False</property>
    <property name="AllowHide" type="bool">True</property>
    <property name="BypassResultTypes" type="bool">True</property>
    <property name="Description" type="string">Content Search Web Part will allow you to show items that are results of a search query you specify. When you add it to the page, this Web Part will show recently modified items from the current site. You can change this setting to show items from another site or list by editing the Web Part and changing its search criteria.As new content is discovered by search, this Web Part will display an updated list of items each time the page is viewed.</property>
    <property name="ShowSortOptions" type="bool">False</property>
    <property name="ExportMode" type="exportmode">All</property>
    <property name="AllowMinimize" type="bool">True</property>
    <property name="ShowPersonalFavorites" type="bool">False</property>
    <property name="ChromeType" type="chrometype">None</property>
    <property name="ShowPaging" type="bool">True</property>
    <property name="ChromeState" type="chromestate">Normal</property>
    <property name="CatalogIconImageUrl" type="string" />
    <property name="HelpMode" type="helpmode">Modeless</property>
    <property name="TitleIconImageUrl" type="string" />
    <property name="ItemBodyTemplateId" type="string" />
    <property name="AlternateErrorMessage" type="string" null="true" />
    <property name="Hidden" type="bool">False</property>
    <property name="TargetResultTable" type="string">RelevantResults</property>
    <property name="AllowClose" type="bool">True</property>
    <property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
    <property name="ShowResultCount" type="bool">True</property>
    <property name="ShowLanguageOptions" type="bool">True</property>
    <property name="ShowUpScopeMessage" type="bool">False</property>
    <property name="Width" type="string" />
    <property name="RepositionLanguageDropDown" type="bool">False</property>
    <property name="Title" type="string">Search Learning Groups</property>
    <property name="ScrollToTopOnRedraw" type="bool">False</property>
    <property name="ShowResults" type="bool">True</property>
    <property name="ShowAlertMe" type="bool">False</property>
    <property name="OverwriteResultPath" type="bool">True</property>
    <property name="PreloadedItemTemplateIdsJson" type="string">null</property>
    <property name="MaxPagesAfterCurrent" type="int">1</property>
    <property name="ShowDefinitions" type="bool">False</property>
    <property name="ShouldHideControlWhenEmpty" type="bool">False</property>
    <property name="AvailableSortsJson" type="string">null</property>
    <property name="DataProviderJSON" type="string">{"QueryGroupName":"f5646507-4a7a-4d75-b5c4-d435b9128e2a","QueryPropertiesTemplateUrl":"sitesearch://webroot","IgnoreQueryPropertiesTemplateUrl":false,"SourceID":"8413cd39-2156-4e00-b54d-11efd9abdb89","SourceName":"Local SharePoint Results","SourceLevel":"Ssa","CollapseSpecification":"","QueryTemplate":"Path:{SiteCollection.URL} AND :{SearchBoxQuery} ","FallbackSort":[],"FallbackSortJson":"[]","RankRules":[],"RankRulesJson":"[]","AsynchronousResultRetrieval":false,"SendContentBeforeQuery":true,"BatchClientQuery":true,"FallbackLanguage":-1,"FallbackRankingModelID":"","EnableStemming":true,"EnablePhonetic":false,"EnableNicknames":false,"EnableInterleaving":false,"EnableQueryRules":true,"EnableOrderingHitHighlightedProperty":false,"HitHighlightedMultivaluePropertyLimit":-1,"IgnoreContextualScope":true,"ScopeResultsToCurrentSite":false,"TrimDuplicates":false,"Properties":{"TryCache":true,"Scope":"{Site.URL}","UpdateLinksForCatalogItems":true,"EnableStacking":true,"ListId":"60ae8593-eddc-45e0-802a-27f78059ce26","ListItemId":4},"PropertiesJson":"{\"TryCache\":true,\"Scope\":\"{Site.URL}\",\"UpdateLinksForCatalogItems\":true,\"EnableStacking\":true,\"ListId\":\"60ae8593-eddc-45e0-802a-27f78059ce26\",\"ListItemId\":4}","ClientType":"ContentSearchRegular","UpdateAjaxNavigate":true,"SummaryLength":180,"DesiredSnippetLength":90,"PersonalizedQuery":false,"FallbackRefinementFilters":null,"IgnoreStaleServerQuery":false,"RenderTemplateId":"DefaultDataProvider","AlternateErrorMessage":null,"Title":""}</property>
    <property name="Direction" type="direction">NotSet</property>
    </properties>
    </data>
    </webPart>
    When we are downloading the 'Top Queries by Month' or 'Top Queries by Day' report, while we see numbers in 'Total Queries' and '% of all queries' columns, we are not finding anything in 'Query Text' column, its empty. Not sure while the analytics is
    not able to fetch/report the 'Query Text' itself - the report doesnt make any sense without 'Query Text' information.
    Is there anything in the web part markup I pasted above- is any of the property value is affecting this?
    Or it can be some configuration/error with the logging/analytics process?
    Please suggest. Thanks in advance.
    Regards,
    Mahavir
    MOSS programmer

    Hi,
    Hope you are doing well. Would you help to try to run the script to start the timer job manually:
    Run the script to start the timer job:
    ==================
    $ua = Get-SPTimerJob -Type Microsoft.Office.Server.Search.Analytics.UsageAnalyticsJobDefinition
    $ua.GetAnalysisInfo()
    $ua = get-sptimerjob -type microsoft.office.server.search.analytics.usageanalyticsjobdefinition
    $ua.DisableTimerJobSchedule()
    $ua.StartAnalysis()
    $ua.EnableTimerJobSchedule()
    $ua = Get-SPTimerJob -Identity ("job-usage-log-file-import")
    $ua.RunNow()
    ==================
    2.  Please install the SharePoint 2013 March update if our version is before this:
    SharePoint 2013 March update:
    http://support.microsoft.com/kb/2767999
    Best Regards,
    Dats Luo

  • Go URL no longer works when placed as 'Treat as Text' column property

    Hi all - I have a question on syntax for using a Go URL as part of the 'Treat as Text' Data Format property for a column...
    In a pivot I had a column (employee name) that had in the formula a Go URL that passed parameters to another report. The drilled to report would then open with the employee that had been clicked on. The go url works fine. However, if the report (the one with the go url link) was to be printed in PDF form, the URL link specified in the column's formula will be printed, not the actual column value, the employee's name.
    So, to get around this, I removed the go url link in the formula and resorted back to the column's value (table name.column name) in the formula and placed the go url syntax (with some modifications) into the 'Data Format' property of the column and set the 'Treat Text As' to:
    *@[html] "<a href=saw.dll?Go&Path=/shared/(...path of report to drill on)&Options=fdr&Action=Navigate&P0=1&P1=eq&P2=" @H ">" @H "</a>"*
    The employee's name is to be included after '...&P2='
    Now, I see the column's value as a hyperlink and the correct report is navigated to, however, the parameters being passed don't work any longer, I'm getting all employees, not just the one I clicked on. This was working until I put the go url into the 'Treat as Text'.
    For what I'm trying to do, does the syntax seem correct?
    Thanks.

    I think I have it solved, will check...
    When modifying, the P3 in the go url was left out. what was P2 should be P3 and the correct P2 would have the table.column name.

  • How to use apex_item.text in a collection or tabular form

    Hello,
    I have a table with table names. (simplified)
    create table test (tab_nm VARCHAR2(30) )
    Now I want to present this tables on a tabular form with a checkbox and a text item to put the short name for this table name.
    So I was thinking in the way of
    select apex_item.checkbox(1,ids) check,
    tab_nm,
    apex_item.text(2,c001) short_name
    from test;
    Ibut this doesn't work since the c001 column does not exist.
    So I probably should go for a collection, but how do I do that and how to process the text put in in the text item?
    Thanks

    Hi Marc,
    I think the purpose is different. I want to create a 3 column report with a checkbox to select the tables I want to use and because I do not store the shortname in the table I want the user to be able to give the shortnames himself for the selected tables.
    So
    checkbox tab_nm from table item( filled in by user but not stored in table)
    x table 1 tab1
    x table2 tab2
    table3 tab3
    writing this I 'm considering to save the short names because it can give conflicts if a shortname is used twice
    Purpose is to generate tables, with sequences and triggers dynamically from the selected tables.
    Erwin

  • Two questions on apex_item.text when date field

    Hi, I have a tabular collection with a date field. I need to have validation on the date field, so wanted to create and authorization (is this the best way). In order to do so, I needed to create an application item (again...is this the best way?).
    I am very new to javascript and use of the ONCHANGE. Is there a way to have a the value of this apex_item.text placed into that application_item? I have tried the following, but it does not work.
    select apex_item.text(6,c006,10,null,
    ||'style="width:100px;background-color:#FBEC5D; "'
    ||'onchange="f_set_start_date(this,f6_'||LPAD (seq_id, 4,'0')||')"') start
    from apex_collection...where.....
    Also, is there a way to force a format for an apex_item.text. I would like it to be in the format dd-mon-yyyy.
    thanks again.

    Hi Ravi, the javascript is located in the page header.
    the Javascript (and this is long as the form has many (8) cascading LOVs) is:
    <script language="JavaScript" type="text/javascript">
    htmldb_delete_message='Are you sure you want to delete the selected records?';
    // Row - Highglight Function
    var rowStyle = new Array(10);
    var rowActive = new Array(10);
    var rowStyleHover = new Array(10);
    rowStyle[1]='';
    rowStyleHover[1]='';
    rowActive[1]='N';
    function highlight_row(checkBoxElemement,currentRowNum)
    if(checkBoxElemement.checked==true)
    for( var i = 0; i
    < checkBoxElemement.parentNode.parentNode.childNodes.length; i++ )
    if (checkBoxElemement.parentNode.parentNode.childNodes.tagName=='TD')
    if(rowActive=='Y')
    rowStyle[currentRowNum] = rowStyleHover[currentRowNum];
    else
    {rowStyle[currentRowNum] =
    checkBoxElemement.parentNode.parentNode.childNodes[i].style.backgroundColor;
    checkBoxElemement.parentNode.parentNode.childNodes[i].style.backgroundColor
    = '#FFFF66';
    rowStyleHover[currentRowNum] = '#FFFF66';
    else
    for( var i = 0; i
    < checkBoxElemement.parentNode.parentNode.childNodes.length; i++ )
    if (checkBoxElemement.parentNode.parentNode.childNodes[i].tagName=='TD')
    checkBoxElemement.parentNode.parentNode.childNodes[i].style.backgroundColor = '';
    rowStyleHover[currentRowNum] = '';
    document.wwv_flow.f11.checked=false;
    // Funntion to Check and un-check rows Rows
    function checkAllDetail(pAllCheckbox)
    if (pAllCheckbox.checked)
    for (var i = 0; i<document.wwv_flow.f11.length; i++)
    if (!document.wwv_flow.f11[i].checked)
    document.wwv_flow.f11[i].checked=true;
    highlight_row(document.wwv_flow.f11[i],i);
    } else
    for (var i = 0; i<document.wwv_flow.f11.length; i++)
    if (document.wwv_flow.f11[i].checked)
    document.wwv_flow.f11[i].checked=false;
    highlight_row(document.wwv_flow.f11[i],'');
    }; // checkAllDetail
    // Cascading Select List Function
    function f_set_casc_sel_list_item(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list',0);
    get.add('TAB_CASCADING_ITEM',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for Market Category
    function f_set_casc_sel_list_item_mkt(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_mkt',0);
    get.add('TAB_CASCADING_ITEM',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for Grade
    function f_set_casc_sel_list_item_grd(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_grd',0);
    get.add('TAB_CASCADING_ITEM',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for PORT
    function f_set_casc_sel_list_item_port(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_port',0);
    get.add('TAB_CASCADING_ITEM',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // Cascading Select List INSTATE
    function f_set_casc_sel_list_item_distance(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_instate',0);
    get.add('TAB_CASCADING_DISTANCE',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for AREA
    function f_set_casc_sel_list_item_area(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_area',0);
    get.add('TAB_CASCADING_INSTATE',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for SUB-AREA
    function f_set_casc_sel_list_subarea(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_subarea',0);
    get.add('TAB_CASCADING_AREA',$x(pThis).value);
    get.add('TAB_CASCADING_INSTATE',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for LOCAL-AREA
    function f_set_casc_sel_list_local(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=tab_casc_sel_list_local',0);
    get.add('TAB_CASCADING_SUBAREA',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for GEAR
    function f_set_casc_sel_list_gear(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value);
    get.add('TAB_CASCADING_GEAR',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    // cascading list for start_date
    function f_set_start_date(pThis,pSelect){
    alert("hello");
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value);
    get.add('TAB_START_DATE',$x(pThis).value);
    gReturn = get.get('XML');
    //alert(gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    function KeyCheck(e)
    var KeyID = (window.event) ? event.keyCode : e.keyCode;
    //alert(KeyID); // If you want to check out the values for other buttons
    if (KeyID == 120)
    doSubmit('SAVE'); // SAVE F9
    if (KeyID == 121)
    doSubmit('COMPLETE'); // complete F10
    </script>
    The actual (long) query is (and the date value is C006):
    select apex_item.hidden (1,seq_id) checkbox,
    apex_item.hidden (2,seq_id)||
    apex_item.select_list_from_query(3,c003,'select partner_name d,
    state_code r
    from partners
    where state_code is not null
    order by partner_name',
    'style="width:100px;background-color:#FBEC5D; "'
    ||'onchange="f_set_casc_sel_list_item_port(this,f4_'
    ||LPAD (seq_id, 4,'0')||')"',
    'YES',
    '0',
    '- Select State -',
    'f3_' || LPAD (seq_id,4, '0'),
    NULL,
    'NO'
    ) STATE,
    apex_item.select_list_from_query_xl(4,c004,'select fips_place_name, port
    from valid_ports
    where fips_state = '
    ||nvl(c003,0)
    ||' order by fips_place_name',
    'style="width:150px;background-color:#FBEC5D;"',
    'YES',
    '0',
    '- Select PORT -',
    'f4_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) PORT,
    apex_item.POPUP_FROM_LOV(5,c005,'VESSELS',
    NULL,NULL,NULL,NULL,NULL,
    'style="width:100px;'
    ||'background-color:#FBEC5D; "') vessel_id,
    apex_item.text(6,c006,10,null,
    'style="background-color:#FBEC5D;"'
    ||'onchange="f_set_start_date(this,f6_'
    ||LPAD(seq_id, 4,'0')||')"') trip_start_date,
    apex_item.text(7,c007,5,null,
    'style="background-color:#FBEC5D"') trip_start_time,
    apex_item.text(8,c008,10,null,
    'style="background-color:#FBEC5D"') trip_end_date,
    apex_item.text(9,c009,5,null,
    'style="background-color:#FBEC5D"') trip_end_time,
    apex_item.SELECT_LIST_FROM_LOV(10,c010,'TRIP_TYPE',
    'style="width:100px;background-color:#FBEC5D; "') trip_type,
    apex_item.SELECT_LIST_FROM_LOV(11,c011,'YES_NO',4) multiple_fishermen,
    apex_item.text(12,c012,3,null,
    'style="background-color:#FBEC5D"') days_at_sea,
    apex_item.text(13,c013,4,null,
    'style="background-color:#FBEC5D"') nbr_of_crew,
    apex_item.hidden(14,c014) supplier_trip_id,
    apex_item.hidden(15,c015) trip_nbr,
    apex_item.text(16,c016) partner_vtr
    from apex_collections where collection_name = 'TRIP_C'

  • Using paragraph format for long text...

    Hello,
    When I try to print the long text using include then
    it starts printing from the very first line.
    But I want to use some paragraph format for it. How can I use it because I am using
    /: INCLUDE '200007200000100' OBJECT AUFK ID KOPF
    So where do I mention the paragraph format in the tag column becaue I am already using /: controll command in font of the include ?

    Check this thread...
    SAPScript - Standard Text
    It looks like the PARAGRAPH P2 statement can do that declaration, on the subsequent line.
    This website also has some good examples:
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    Cheers,
    John

  • Copying TEXT column from flat file into SQL results in empty fields....

    I'm copying TEXT column from SQL to Flat file (ragged right fixed width) - DT_TEXT. It copies fine and I''ve checked the output file. Now, while trying to copy the flat file to sql server in another system. I find all the fields are empty.
    When I preview the source from flatfile, I see all the entries there. But it copies other fields but the field with DT_TEXT  is empty.
    This is when I preview
    SQL Table output
    Any help will be helpful!!!

    Hi, I'm not sure If I'm understanding what you're saying. The data got copied from SQL to Flat file. I've double checked the flat file and I see the DT_TEXT data there. The size of file also gives an indication that there's existence of TEXT Data
    But, when I copy that data back to sql again (which I can also preview before the load), The DT_TEXT values goes missing. Same when I copy to Excel as CSV or as a Flat file. I don't see text data.
    The TEXT data resides on the first output. But when I try to extract to other format from that output, it doesn't come out.

  • SharePoint 2013 get Term's "other label" to text column

    Hi,
    does anyone now how to do or has anyone done following with SharePoint 2013. What we would need to happen is when user selects value from managed metadata (the main label) then the terms synonym/other label would be stored to text field.
    So lets say our selected term is "foo" and its synonym would "bar". How can I get that to the text field automatically.
    Below Material Number woud be the managed term and Material Description(text column) would be the synonym.
    Compared to list lookup you can there select addional columns if you want. So I'm looking similar solution for managed metadata.
    I would like to maybe do this just by editing the list/library forms with designer/nintex forms. And I now that there is ways to get terms with JSOM, but I'm not that familiar with those:
    https://cann0nf0dder.wordpress.com/2013/04/09/accessing-taxonomy-term-store-with-jsom/
    http://www.vrdmn.com/2012/12/working-with-taxonomy-and-javascript-in.html
    Any help would be much appreciated.

    Hi Kalle,
    Based on your description, my understanding is that you want to get the label of the term selected in the Material Number column and display it in the Material Description field.
    I suppose that you set the Material Number column to allow single value only.
    Here is a code example for achieve this goal and the code need to be added to the New Item form:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="/_layouts/15/SP.Taxonomy.js" type="text/javascript"></script>
    <script type="text/javascript">
    var dlabel='';
    $(document).ready(function () {
    $("div.ms-rtestate-write").blur(function(){
    var txt=$("input[id='Material_x0020_Number_$input']").val();
    var s="string";
    if(txt!="") s=txt;
    dlabel=s.substring(0,s.indexOf("|"));
    var guid=s.substring(s.indexOf("|")+1);
    getLabel(guid);
    function getLabel(termguid){
    var clientContext = SP.ClientContext.get_current();
    var taxSession = SP.Taxonomy.TaxonomySession.getTaxonomySession(clientContext );
    var termStores = taxSession.get_termStores();
    var termStore = termStores.getByName("Managed Metadata Service");//change the term store name here
    var termSet = termStore.getTermSet("b6756f2d-4c5e-418f-8378-60e401d466f5");//change the term set guid here
    var term=termSet.getTerm(termguid);
    this.labelColl = term.getAllLabels(1033);
    clientContext.load(labelColl);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded(sender, args) {
    var label = '';
    var sum='';
    var labelEnumerator = labelColl.getEnumerator();
    while (labelEnumerator.moveNext()) {
    label = labelEnumerator.get_current();
    var value=label.get_value();
    if(value!=this.dlabel){
    sum+=value;
    sum+=" ";
    $("input[Title='Material Description']").val(sum);
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Victoria Xia
    TechNet Community Support

  • Disable apex_item.text

    Hello,
    I have the following problem:
    I need a tabular form with one text-box-column, where the user can type in something.
    The problem is, that the column should be disabled if the value of the maximum-column = 0.
    I know that it should be something like this:
    select
    containername,
    maximum,
    apex_item.text( .... disable = true..... ???) <<----- I don't know how to do this
    from tbl_count
    Can anybody help me?
    Thank you soooo much,
    LISA :-)

    Hi Lisa,
    CASE statements must end with an END, so:
    SELECT
    containername,
    maximum,
      CASE maximum
        WHEN maximum > 0 THEN
          apex_item.text( 1,null)    
        ELSE
          apex_item.text( 1,null,,,'disabled')
        END new_max
    from tbl_count;Andy

Maybe you are looking for

  • How do I upload photos from my PC to a share a album

    how do I upload photos from my PC to a share a album?

  • Podcast doesn't play in iTunes

    Hello guys, I have made a video podcast page. This is what I did: - clicked File>New Page, then I did choose Podcast page template from iWeb library - changed text - dragged and dropped my own video clip (.m4v QT which is supported format for apple T

  • How to set Lens correction in LR3

    Hi, I am sure this has been answered before but I can't find any answers in LR Help, here or google.  Is there a way of setting the "Lens correction" in LR3 to be on by default?  as it is now I have to se tit for each image. thanks Chris

  • Image quality of T4i vs D5100

    My son bought a Nikon D5100 while we were in Japan I took my Canon T4i. And did notice that his pictures especially in low light appear to have much less noise. Then I came across this website: http://snapsort.com/compare/Canon-Rebel-T4i-vs-Nikon-D51

  • Mac pro load balancing

    Hello guys, I was wondering if it's possible to use the two network interfaces on the mac pro to make use of the two different internet lines for a wider bandwidth. On my last pc that was possible using a utility from nvidia performance network. What