Get Current Datetime in an XSL

How do I add a current Datetime to an XSL document? The following sample works in XALAN but not ORAXSL. date:new() returns nothing!?
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date" exclude-result-prefixes="date">
<xsl:template name="createCurrentDATETIME">
<xsl:variable name="today" select="date:new()"/>
<xsl:variable name="len" select="string-length(normalize-space($today))"/>
<xsl:choose>
<xsl:when test="$len &gt; 0">
<xsl:element name="DATETIME">
<xsl:element name="YEAR">
<xsl:value-of select="substring($today,$len - 4,$len)"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="DATETIME">
<xsl:element name="YEAR">2002</xsl:element>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
...

The following example will work. Please use the "toString()" functions.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date" exclude-result-prefixes="date">
<xsl:template match="/">
<xsl:variable name="today" select="date:new()"/>
<xsl:variable name="len" select="string-length(normalize-space(date:toString($today)))"/>
<!-- <xsl:value-of select="date:toString($today)"/>-->
<xsl:value-of select="substring(date:toString($today),$len - 4,$len)"/>
</xsl:template>
</xsl:stylesheet>

Similar Messages

  • How do i get current dateTime in xsl1.0

    Hi,
    I came to know that current-dateTime() function is working fine with xsl version 2.0 but not in xsl version 1.0
    Can anyone suggest me how to get current date time which works fine with xsl version 1.0 and BPEL process manager (OracleApplicationServer 10.1.3).

    Make sure that the History is enabled:
    *Firefox/Tools > Options > Privacy > Firefox will: "Use custom settings for history" > Remember my browsing history
    Make sure that you do not run Firefox in permanent Private Browsing mode.
    *https://support.mozilla.com/kb/Private+Browsing
    To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    *Deselect: [ ] "Always use private browsing mode"
    Another possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • How to get current datetime in KQL

    I need to create the following KQL query:
    {SearchBoxQuery} ManagedProperty1 > DateTime.Now
    What should I write instead of DateTime.Now?
    I had searched a lot for an answer in Bing and here before I posted this question.
    Any Idea?

    I solved it:
    I had to use the keyword {Today}
    {SearchBoxQuery} ManagedProperty1>{Today}
    Notice that it's important to not have a space near the > character.

  • How to get accurate date on current-dateTime function?

    I am new to oracle ESB. Using a DBAdapter, was trying to populate a table row column with sysdate. So, used current-dateTime in xsl mapping. Works well, I can insert time, but this time is always 1 hour greater than current time. Is there something I need to do without substracting 1 hour from it?
    We have the server & the application running in the same time zone.
    Please suggest.

    ESB is always trouble when trying to debug these issues.
    If you go to enterprise manager. When you login you should see a link to oc4j_soa, select this. If not select home.
    Select the Administration tab.
    Select the Logger Configuration link.
    search on esb, make sure it is lower case.
    Find the entry oracle.tip.esb.server.service, make change the logging level to fine.
    This should display the variables being passed in the xml.log file.
    Is the time zone the same as the database?
    Its looking like you might have to raise a SR for this as the application should not be changing the time.
    cheers
    James

  • Current datetime in xslt

    Hi ,
    I want to get the current datetime during my xlst tranform. I used the below codes but can not get it .
    xslt 1.0
    <xsl:stylesheet ...
    xmlns:ex="http://exslt.org/dates-and-times" extension-element-prefixes="ex">
    <xsl:value-of select="ex:date-time()"/> ...
    </xsl:stylesheet>
    error i got: the function date-time() can not be found.
    xlst 2.0
    <xsl:value-of select="current-dateTime()"/>
    error i got : the function current-dateTime() can not be found.
    Does anyone know how i can solve this problem? Any example or suggestion is welcomed.
    Thanks in advance.
    Dennis

    If that piece of xslt has any chance to succeed, you have to do either one of the modification.
    [1] Either you change the version attribute to 2.0. Oracle xslt processor is one of the earliest to get xslt 2.0 support at the time it is still a working draft. I think current-dateTime() xslt 2.0 function should be supported.
    <xsl:stylesheet version="2.0"[2] There are quite a bit of oracle proprietary extensions there. Hence, if you understand the suggestion(s) all along, it should do the task without appealing to the other extensions which may have their own functions to get the current date-time. This is how you should do for a test, keeping the version="1.0" unchanged.
    <xsl:stylesheet version="1.0"
    xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:ns0="http://www.example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    exclude-result-prefixes="xsl xsd ns0 xref xp20 bpws ora ehdr orcl ids hwf date ">
    <xsl:template match="/">
    ...etc
    <TimeStamp><xsl:value-of select="date:toString(date:new())"/></TimeStamp>
    ...etc
    </xsl:template>

  • Need milli seconds part in XSLT Date Function  current-dateTime()

    Hi All,
    I am calling date function, current-dateTime() in XSL. The output format is 2012-04-05T16:38:01-07:00 (Without milli seconds)
    How to get the milli seconds part...?
    Regards,
    Sudheer

    Hi Arik....
    At last i got it. :)
    Followed the below steps.
    Step1:
    Created a String variable "currentDateTimeValue" in BPEL.
    Step2:
    I have used the below code in JavaEmbedding in BPEL.
    java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat();
    //Date Pattern looks lil weird. But some Web service accepts only this format.
    sdf.applyPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'-00:00'");//2012-04-14T16:24:00.578-00:00
    String formattedDate = sdf.format(new java.util.Date());
    addAuditTrailEntry("Formatted datetime string is: " + formattedDate);
    setVariableData("currentDateTimeValue", formattedDate);
    Step3:
    Created a Simple XSD with an element "DateElement" of String type.
    Step4:
    Assigned "currentDateTimeValue" value to "DateElement" element, in Assign activity.
    Step5:
    Now added this DateElement in Transformation activity, as a second source variable. Mapped this data to the required target element in my XSL.
    uh-huh I got the output...
    Thanks a ton ARIK :D u r really helpful...
    Regards,
    Sudheer

  • Problem with getting current date and time using oracle.jbo.domain.Date

    I`d like to get current date and time using oracle.jbo.domain.Date method getCurrentDate(), but it always return current date and 12:00:00. I also need to get the current time.

    I think you should use java.sql.Timestamp domain.
    (And set database type to TIME or DATETIME.)
    Jan

  • Current DateTime in Database polling 'WHERE Clause'

    Hi,
    I am trying to explore the usage of polling option with Database adapter in SOA Suite 11g.
    I am doing a sample process which will poll the data from a database table which has 2 fields, one is ID and the other one is UpdatedDate which is of type TIMESTAMP. I am trying to delete the records after polling, whose UpdatedDate is less than the current date. I am using the where clause in polling option to set the condition of UpdatedDate < CurrentDate.
    The problem is I am not getting, how to get the current date in the right side of the expression. To provide the right side option, we have 3 options of Literal, Query and parameter. I have tried will all the options; when I am trying with Literal, the right side is updated with Null value.
    Could any one help me to resolve this issue. I need the value of current dateTime as the right side expression of the where clause.
    Thanks.

    Hi,
    You're maybe over complicating this... The DbAdapter should be able to delete processed records automatically for you since you use one of the defined polling strategies...
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/adptr_db.htm#CHDEFACG
    Cheers,
    Vlad

  • Reg : xp20:current-dateTime() gives error

    Hi,
    When i use xp20:current-dateTime() function in XSLT 1.0 inside OSB ( replace activity ), it works fine when used alone ,but gives following error when used with dn:lookupvalue functio ( custom xpath function)
    BEA-382513: OSB Replace action failed updating variable "body":
    java.lang.NoSuchMethodException: For extension function, could not find method
    oracle.tip.pc.services.functions.Xpath20.current-dateTime([ExpressionContext,] ).
    Checked both static and instance methods.
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    Please let me know any other datetime function which gives current date time in the following format
    2012-05-23T06:00:11+00:00
    or plz let me knoiw the solution to the above error

    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="../xsd/CrediTransfer.xsd"/>
    <rootElement name="CreditTransferRequest" namespace="http://vodafone.com.mt/Siebel_Order_Creation"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="../xsd/CrediTransfer.xsd"/>
    <rootElement name="CreditTransferResponse" namespace="http://vodafone.com.mt/Siebel_Order_Creation"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.5.0(build 110418.1550.0174) AT [FRI APR 06 15:04:12 IST 2012]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dvm="http://www.sLabs.com/soa-utilities/osb/soa.utilities.dvm.LookupTable"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:soc="http://vodafone.com.mt/Siebel_Order_Creation"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:con="http://www.bea.com/wli/sb/stages/transform/config"
    xmlns:fn="www.w3.org/2004/07/xpath-functions/"
    exclude-result-prefixes="xsi xsl xsd soc bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap con fn">
    <xsl:template match="/">
    <xsl:variable name="ErrorMessage" select="/con:message"/>
    <!--
    <xsl:variable name="ErrorMessageTwo" select="fn:substring(ErrorMessage,1,4)"/>
    -->
    <soc:CreditTransferResponse>
    <soc:return>
    <soc:StandardResponse>
    <soc:success>
    <xsl:value-of select="dvm:lookupValue('AbstractionLayer_errorCodes','ErrorCode','2','Success','DefaultValue')"/>
    </soc:success>
    <soc:returnCode>
    <xsl:value-of select="dvm:lookupValue('AbstractionLayer_errorCodes','ErrorCode','2','returnCode','DefaultValue')"/>
    </soc:returnCode>
    <soc:message>
    <xsl:value-of select="substring($ErrorMessage,1,4)"/>
    </soc:message>
    <!--
    <soc:message>
    <xsl:value-of select="dvm:lookupValue('AbstractionLayer_errorCodes','ErrorCode','2','Message','DefaultValue')"/>
    </soc:message>
    -->
    <soc:date>
    <xsl:value-of select="xp20:current-dateTime()"/>
    </soc:date>
    </soc:StandardResponse>
    </soc:return>
    </soc:CreditTransferResponse>
    </xsl:template>
    </xsl:stylesheet>

  • How to set timezone or output format returned by "current-dateTime()"?

    I would like to record a datetime stamp in log message I write at various points in my workflow.  When I build my log message using "concat(current-dateTime(), blah blah blah)" the time is formatted in what we used to call zulu time which appears to correspond to GMT, e.g.:
    2011-02-11T15:35:02Z: Begin processing file 0101-376547-377-109-0.pdf
    Is there a way to get control of how this data and time are formatted other than retrieving each component individually and concatinating the pieces manually?
    Thanks for any suggestions!
    Noam

    hi,
    your created  data
    step 1
    I create excel data like this
    year___ | month_ | Product | revenue
    02-04-09 | 02-04-09 | a | $4,154
    03-04-09 | 03-04-09 | b | $6,813
    04-05-09 | 04-05-09 | a | $9,875
    05-06-09 | 05-06-09 | b | $6,813
    06-04-10 | 06-04-10 | a | $6,813
    07-04-10 | 07-04-10 | b | $9,875
    08-06-10 | 08-06-10 | a | $9,875
    22-06-10 | 22-06-10 | b | $6,813
    In this, year and month both are same data, make the diffent data like year  2009, 2010  And month Jan, Feb, March, ...Etc 
    and also one more check you formulas on month and year, select correct source data, destination data  for compoonent..
    OR
    from above, to create a date column and convert  date-->year, date--> month and Explore it.
    All the best,
    Praveen

  • Xp20:current-dateTime dose not return actual time in daylight saving

    Hi,
    I have observed that xp20:current-dateTime dose not return the actual time in daylight saving. e.g. when the system time is 14:43:00 the xp20:current-dateTime function returns 15:43:00 i.e. additional 1 hour. Is this a known issue? How to prevent this from happening?
    Thanks in advance.

    Hello,
    I've the same problem. This occurs in BPEL middle tier instalation
    ( Linux x86 timezone set to Europe/Prague)
    and also in JDeveloper > Test xsl form. ( Localised Win XP SP2)
    BPEL version is 10.1.2.0.0.
    In our country we have now CEST ( Central European Summer Time) = GMT +2:00.
    xp20:current-dateTime returns for example 2006-06-27T13:10:15+01:00
    The time 13:10:15 is correct time in our timezone, but timezone +01:00 is not correct.
    Timezone should be +02:00. (?)
    When I insert this dateTime into database table, I have incorrect value there.
    Is there any way to solve this problem? ( any settings ...?)
    Regards
    Karel

  • Get current event in iCal

    I'm trying to create a script that would run as a trigger to set my away message in Adium to currentEventName - eventLocation
    Theoretically, my code works, and it does... sometimes. I figure there is some bug in it I'm just missing. Any help would be appreciated. Note that this has to work for for repeated items. I have cut the date off at the minute since the date and time has to be exact - unless of course you know of a way to fix this. Thanks. Below is the code.
    set myEvent to "Unknown Event"
    --gets the current date minus the time
    set curDate to (weekday of (current date)) & ", " & month of (current date) & ¬
    " " & day of (current date) & ", " & year of (current date) as string
    set curTime to round ((time of (current date)) / 60) rounding down
    set curHour to round (curTime / 60) rounding down
    set curMin to curTime mod 60
    --fixes the 0 problem
    if curMin < 10 then
    set curMin to "0" & curMin as string
    end if
    if curHour > 12 then
    set today to curDate & " " & curHour - 12 & ":" & curMin & ":00 PM" as string
    else
    set today to curDate & " " & curHour & ":" & curMin & ":00 AM" as string
    end if
    --today should now be the correct time without the seconds
    set today to date today
    tell application "iCal"
    repeat with i from 1 to count of every calendar
    if myEvent is "Unknown Event" or myEvent is {} then
    set myEvent to (summary of every event of calendar i whose start date is today)
    set myPlace to (location of every event of calendar i whose start date is today)
    end if
    end repeat
    end tell
    if myEvent is {} then
    set myEvent to "Unknown Event"
    --display dialog "No event on " & today
    end if
    if myPlace is {} then set myPlace to "Unknown location"
    set myAway to myEvent & " - " & myPlace as string
    tell application "Adium"
    set my status type to away
    set my status message to myAway
    end tell
    PowerMac G5 DP 2.0Ghz   Mac OS X (10.4.6)   1.5GB RAM, 160GB SATA HD, 160GB ATA HD (enclosure)

    Apparently, it works even faster if executed from iCal (as opposed to running with the events tab closed).
    There were a couple of minor bug fixes, but I've tested it on a fake repeated event, and will see if it really works tomorrow.
    Known bugs:
    does not work for daily
    does not work for monthly (ie, things on the third sunday)
    For now though, this is fine as almost all my things are custom weekly events.
    Here's the code:
    --Get current time, current time without seconds, and day abbreviation
    set current_date to (current date)
    set today to current_date - (seconds of current_date)
    set now to (time of (current date)) - (seconds of (current date))
    log now
    log today
    set thisYear to year of (current date) as number
    set thisMonth to month of (current date) as number
    set thisDay to day of (current date) as number
    set thisDate to characters 1 thru 2 of (weekday of (current date) as string) as string
    log thisDate
    --Init vars
    set freq to ""
    set interval to ""
    set endDate to ""
    set myEvent to ""
    set myPlace to ""
    set setBool to false
    tell application "iCal"
    repeat with i from 1 to count of calendars
    if setBool is true then exit repeat
    repeat with j from 1 to count of events of calendar i
    set rec to recurrence of event j of calendar i as string
    set curDays to my getDays(rec, j, i)
    if thisDate is in curDays then --Check if the event ocurrs today
    set endDate to my getEnd(rec, j, i)
    --If the end date is equal or greater to the current date (minus seconds)
    if item 3 of endDate ≥ thisYear and (item 2 of endDate > thisMonth or (item 2 of endDate = thisMonth and item 1 of endDate ≥ thisDay)) then
    set eventStartTime to (start date of event j of calendar i)
    set eventStartTime to (time of eventStartTime) - (seconds of eventStartTime)
    if eventStartTime is now then
    set myEvent to summary of event j of calendar i
    set myPlace to location of event j of calendar i
    set setBool to true
    exit repeat
    end if
    end if
    end if
    end repeat
    end repeat
    end tell
    try
    if myEvent is "" then set myEvent to "Unknown Event"
    on error
    set myEvent to "Unknown Event"
    end try
    try
    if myPlace is "" then set myPlace to "Unknown Location"
    on error
    set myPlace to "Unknown Location"
    end try
    set myAway to myEvent & " - " & myPlace as string
    if myAway is "Unknown Event - Unknown Location" then set myAway to "Out. Call the cell."
    tell application "Adium"
    set my status type to away
    set my status message to myAway
    end tell
    --display dialog myAway
    (* Parse Recurrence *)
    on getFreq(str)
    try
    return word 3 of str
    on error
    return ""
    end try
    end getFreq
    --Not used right now, but I feel it should be...
    on getInterval(str)
    try
    return word 6 of str
    on error
    return ""
    end try
    end getInterval
    on getStartDay(eventNum, calNum)
    tell application "iCal"
    set startDay to items 1 thru 2 of (start date of event eventNum of calendar calNum as string) as string
    end tell
    return startDay
    end getStartDay
    on getEnd(str, eventNum, calNum)
    try
    set endDate to items 1 thru 8 of word 9 of str as string
    set endYear to items 1 thru 4 of endDate as string
    set endMonth to items 5 thru 6 of endDate as string
    set endDay to items 7 thru 8 of endDate as string
    set endYear to endYear as number
    set endMonth to endMonth as number
    set endDay to endDay as number
    log {endDay, endMonth, endYear}
    on error --It isn't a recurring event
    tell application "iCal"
    set endDate to end date of event eventNum of calendar calNum
    set endYear to year of endDate as number
    set endMonth to (month of endDate) as number
    set endDay to (day of endDate) as number
    log {endDay, endMonth, endYear}
    end tell
    end try
    return {endDay, endMonth, endYear}
    end getEnd
    on getDays(str, eventNum, calNum)
    set dayList to {"MO", "TU", "WE", "TH", "FR", "SA", "SU"}
    set recDays to {getStartDay(eventNum, calNum) of me}
    log recDays
    try
    repeat with i from 12 to length of str
    if word i of str is in dayList then
    set recDays to recDays & word i of str
    else
    exit repeat
    end if
    end repeat
    return recDays
    on error
    return recDays
    end try
    end getDays

  • XSLT Mapping - Getting current date in XSLT version 1.0

    Hi,
    I want to fetch the system date and compare it with another date, say 06.04.2010.
    How can I do this in XSLT 1.0?
    Thanks & Regards,
    Aditi Naik

    Hi,
    I tried using the following code:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cal="java:java.util.GregorianCalendar">
         <xsl:output method="xml"/>
         <xsl:template name="currentDate" xmlns:cal="java:java.util.GregorianCalendar">
              <xsl:variable name="now" select="cal:getInstance()"/>
              <xsl:variable name="day" select="cal:get($now, 5)"/>
              <xsl:variable name="month" select="cal:get($now, 2)"/>
              <xsl:variable name="year" select="substring(string(cal:get($now, 1)), 3, 2)"/>
         </xsl:template>
    <Body>
              <xsl:choose>
              <xsl:when test="boolean(//*[local-name() = 'IRenvelope']/node()) and boolean($year = 2009) and boolean($month &gt; 11) and boolean($day &gt; 05))">
              </xsl:when>
              </xsl:choose>
    </Body>
    However, when I try to run this mapping I get the error "Invalid XPath Expression" in Altova.
    Can you please tell me exactly what is wrong with this code and how I can get around this?
    Thanks & Regards,
    Aditi Naik

  • Get current playlist in iTunes

    I'm pretty sure this worked at one time, but I don't know what was changed.
    I need to get the name of the currently selected playlist.The following command doesn't work on 2 different computers (10.4 & 10.3).
    tell application "iTunes" to get current playlist
    Looking at the dictionary from both machines, this should work. I'm totally confused, hopfully I'm just missing something stupid.
    Oh ya, the "current track" property has the same problem.
    Both properties only return "unknown object" error
    iBookG4/eMac/iMacx2/G3300/G4400   Mac OS X (10.4.2)  

    Current track & playlist only return info about what's playing. If nothing is playing, you'll get an error. What you want is the visible selection, which is obtained thusly:
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "iTunes" to get view of front browser window</pre>You can also get the playlist from a visible track selection:
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "iTunes"
    set selected_tracks to selection
    set selected_playlist to container of first item of selected_tracks
    end tell</pre>

  • Get Current row in Editable ALV

    Hi,
    I have editable alv, when i press "insert row" or "Append row" i need to get current inserted/appended row element reference or index.
    How can i get this??
    Please suggest.

    Hi kranthi ,
    While inserting row you must be selecting a row, you can get the index of the selected row by this following code
    get Index of selected table item
    CALL METHOD NODE_NAME->GET_LEAD_SELECTION_INDEX
    RECEIVING INDEX = Lv_Indx.
    ( DATA: Lv_Indx Type i )
    or while you are appending a row you can use Describe int_table LINES lv_line and use the value of 'lv_line' as the index.
    Regards

Maybe you are looking for

  • Lot number generation when ever GR is done

    Dear All, As there is a requirement like Lot number generation when ever GR is done. For each material Lot Number is defined by the client. And there is partial receipt of Goods. Whenever you do GR system automatically generates Lot number. So we nee

  • Language Diappear

    Arabic language Diappear from my mobile E-7 i can not write Arabic how can i fix this problem ?

  • Has anyone else seen this error code and know a remedy?

    Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DF015, DW063 ... WARNING: DF012, DW029 ... -------------------------------------- Summary -------------------------------------- - 0 fatal error(s),

  • Updating pages after Template Update

    Hi folks. So I'm running into a problem. I update the template as my client wants changes. I say yes to the dialog box question "10 pages to update?". All the template files/slices/jpgs dissapear and when I open to view, I see only text/editable cont

  • Partition table corrupted after installing OSX10.8.3

    I installed OSX 10.8.3 from the Mac App Store on Friday and after installing, my macbook rebooted and a grey bar appeared at the bottom of the screen like it was updating the EFI... After waiting the bar to be full (apprx 45 minutes), it simply stopp