Script date object
Hi,
I have a date/time field.
I want to initialize it with the current date.
In the initialize event of this the field, I have an issue with this script :
xfa.host.messageBox("before new date()");
var d1 = new Date();
xfa.host.messageBox("after new date()");
The line var d1 = new Date(); doesn't work. I work with designer 8.1.1, the language is Javascript and it is run at client.
Any ideas will be appreciated.
Thanks
It works fine for me ....can you post your form to [email protected] and I will have a look.
Similar Messages
-
Deployment question for EMS and Data Objects
I have configured tens of EMS and data objects. It's deployment time to a new environment, say Dev to Test. Do i have to manually create all this data objects and EMS in each environment, or is it possible to write a script or deployment script to do it automatically for each environment. If not, it will be a headache configuring all these DO and EMS again for eah environment. Please suggest.
ThanksSee this guide: http://download.oracle.com/docs/cd/E15523_01/core.1111/e10105/testprod.htm#CHDDIEBI
Specifically on the usage of icommand in section 20.4.2 -
_system.date() as a date object?
My system reports back _system.date() as mm/dd/yy which I
could easily parse but I understand that the system date format is
dependent on the user's OS, preference settings, language, mood ;-)
There’s got to be an easy way to get the system date as a
date object. I saw in an earlier post that OpenSpark has written a
bunch of cool calendar math routines but I need to start with
today’s date as a date object.I use JavaScript syntax exclusively anymore, so I use the
JavaScript syntax Date object. It’s fairly robust and
x-platform. This is much like ensamblador’s use of the Flash
Date object. The Flash Date object and the JavaScript syntax Date
object are both implementations of ECMAScript 262, so it’s
one of those “six of one half dozen of the other”
situations. If you are scripting in Lingo then you would need to
create a Flash object and then instantiate a Date object in it. If
you’re scripting in JavaScript syntax then just use its
native Date object. When using the Date object you gotta remember
that the day of the week – dateObject.getDay() - and the
month - dateObject.getMonth() – are zero indexed... 0 =
Sunday, 0 = January etc. When I have to display day names or month
names I use arrays to store the names I want to display. Also,
hours are in 24 hour (military) time, so dateObject.getHours()
would return 16 at 4:27 pm. You can account for that by subtracting
12 from the returned Hours value if it is greater than 12.
function exitFrame(me)
var dObj = new Date();
var theHour = dObj.getHours();
var apendTime = " am";
var dayArray = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var dateArray = new
Array("January","February","March","April","May","June","July","August","September","Octo ber","November","December");
var iText = member("infoText");
///// show the date textually
iText.text = dayArray[dObj.getDay()] + " " +
dateArray[dObj.getMonth()] + " " + dObj.getDate() + ", " +
dObj.getFullYear();
///// mm/dd/yyyy format
iText.text += "\n" + (dObj.getMonth() + 1) + "/" +
dObj.getDate() + "/" + dObj.getFullYear();
///// show the time like a digital clock
// 24 hour (military) time
iText.text += "\n" + theHour + dObj.getMinutes() + ":" +
dObj.getSeconds();
// civilian time
if (theHour > 12)
iText.text += "\n" + (theHour - 12);
apendTime = " pm";
} else {
iText.text += "\n" + theHour;
apendTime = " am";
// the minutes and seconds
iText.text += ":" + dObj.getMinutes() + ":" +
dObj.getSeconds() + apendTime;
_movie.go(_movie.frame);
} -
While following a turorial from pfdScritping I found that the data object "sourceSet" not available in script editor after entering "xfs.", a dropdown menu appears with a list of available objects but does not include sourceSet, can anyone tell me why or what I need to do.
hi
any thing
that is being declared by using
DATA:
will occupy memery and caleed data object
where as if u use TYPES
it only defines the defination but no memeory is allocated to it
Cheers
Snehi -
How to remove all scripts on object instances?
I'm looking for any kind of solution here, besides disabling the warning.
I hate it when I'm converting someone else's AS2 project to AS3, and there's code buried on an onstage instance somewhere, which gives me the warning:
"Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored."
How can I:
A) Find which instances have code on them.
or
B) Remove all code on all instances.
Idea:
Can I save as a different format/version/something and lose this data somehow. Then I could convert it back its current FLA format?YES!!! So awesome!! Thanks
-
BAM 11g Moving External Object Data to Internal Data Object
Hi
I'm working with external data objects in our dashboards, this objects are updated every 30 minutes.
It's posible to update Internal Data objects at same time using triggers in BAM schema for use Active Data?
I need to autorefresh the Dashboard every 15 minutes.
Thanks for your comments
Ricardo
Edited by: rzegarrape on Jun 26, 2010 10:06 AMHi
What is the use case. Are you trying to automate a refresh of the report view based on an External data object? Or is there another use case - i am confused about 'moving external dataobject to internal data object' comment.
Some basic questions:
Version of BAM in use
Version of IE in use
Do you see updates in the browser for the internal DOs. For example, run call center sample with the scripts in [soa_home]/bam/samples/bam/callcenter/bin and verify that you can see the updates on the call center dashboard in Active Viewer.
Can you describe the setup a little - where is the data you want to view & refresh in the dashboard?
Regards
Payal -
Website needs Microsoft Data Access - Active X Data Objects
I have a number of websites for work that are seem to be built around Internet Explorer. When I try to open them on my Mac at home with Safari, I get message that I pasted below.
I'm thinking this might be related to the fact that when I open them on a PC for the first time it shows a similar message, but Internet Explorer prompts me to download and run "Microsoft Data Access - Active X Data Objects", and then it runs fine.
Based on this I'm assuming it's a lack of these "objects" that are causing this problem. Is there any equivalent to these components for the Mac? Anything I can try to access these websites from my Mac? I've tried using Firefox as well, which has the exact same issue.
Right now I've got to fire up my 2006 PC laptop to use Internet Explorer every time I need access to these sites. I realize I could install windows on my Mac with bootcamp and restart in windows every time I need access, but that seems like a waste just to visit 2 websites. Any advice?
+"Scanning Required components...+
+The user's Internet browser requires proper configuration to access our site. Read the following instructions on how to set up the browser properly.+
+Active Scripting Configuration:+
+Select Tools from the Internet Explorer menu bar.+
+Select Internet Options ...+
+Select the Security tab.+
+In the Web Content Zone list, select «Internet».+
+Click Custom level....+
+In the Settings list, scroll down to the Scripting section.+
+Check the Enable option under the «Active scripting» item and click OK.+
+Click Yes to confirm the change in the security settings.+
+In the Internet Options dialog box, select the «Local intranet» and repeat steps 5 to 8.+
+Click OK to close the dialog box."+Hi,
Try this...
From your Safari menu bar click Safari / Preferences then select the Advanced tab. Enable the develop menu.
In the menu bar click Develop / User Agent.
Try IE 8, 7, or 6.
No guarantees but can't hurt to try. ActiveX requires Windows.........
Carolyn -
OIM API Data Object Manager Functionality
Hi all,
I am working on creating a script for a client that will automate attaching handlers to data objects. In the design console this action can be performed on the Development Tools > Business Rule Definition > Data Object Manager screen. Does anyone know where in the API I can perform this operation?
Regards,
LukeAfter more investigation I have discovered that the DVT table in the oim schema stores the information about the event handlers that have been attached to a data object. I hope this helps shed more light on the situation. If anyone has any suggestions about where I can look for the API information please let me know. I have already looked through the java docs here:
http://otndnld.oracle.co.jp/document/products/id_mgmt/idm_903/doc_cd/javadocs/operations/index.html -
Bam 11 plan status data object update
Hi Guru,
I need to update the column StatusTime of plan_status DataObject (under dir of BAM "/System/Plan Monitor/Oracle BAM Plan Monitor/Plan Status").
When I tried to update the column Status_time
(with the instruction= bam.updateRows(tablename, rs, strKeys, strKeyConds, strUpdCols, strUpdOps, lCommitSize, lBatchSize))
by ODI's KM, BAM throws the Exception:
La colonna StatusTime è di sola lettura = The column StatusTime is only readable
Do you know a way to update this column???
BR Fabio
Next the BAM exception:
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 42, in ?
java.sql.SQLException: BAM-01209 La colonna StatusTime è di sola lettura.
at oracle.bam.enterpriselink.common.SrcMetaData.setColumnInfo(SrcMetaData.java:335)
at oracle.bam.enterpriselink.common.SrcMetaData.<init>(SrcMetaData.java:89)
at oracle.bam.enterpriselink.BAMJdbcConnection.updateRows(BAMJdbcConnection.java:1018)
at oracle.bam.enterpriselink.BAMJdbcConnection.updateRows(BAMJdbcConnection.java:2183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyObject.invoke(PyObject.java)
at org.python.pycode._pyx7.f$0(<string>:42)
at org.python.pycode._pyx7.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.Py.exec(Py.java)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.j(e.java)
at com.sunopsis.dwg.cmd.g.z(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:619)
java.sql.SQLException: java.sql.SQLException: BAM-01209 La colonna StatusTime è di sola lettura.
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.j(e.java)
at com.sunopsis.dwg.cmd.g.z(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:619)Hi Fabio,
StatusTime field is of datatype "Timestamp". These field types get automatically inserted by BAM whenever a row is inserted in the dataobject. Users are not allowed to enter or update this particular field explicitly.
Further, this particular data object is a system data object which gets updated automatically by Enterpriselink when plans actually execute. This was used in BAM 10.1.3.5, and not really used for 11g, where the enterprise link functionality has been replaced by ODI. Did you get this DO from the from the 10.1.3.5 upgrade ?
Thanks,
Prabhat -
Can't access properties of Date Object
My FMS client is calling a function (simplified) which gets the offset time in milliseconds of an flv file. According to the docs for creationTime, it should return a Date object containing the time the file was created. I cannot access any properties of the date object in the server script.
For example
Client.prototype.listFiles = function( folderName ) {
var testFile = new File('/streams/folder/fileName.flv');
trace("creationTime: " + testFile.creationTime);
trace("milliseconds: " + testFile.creationTime.time);
return 'should be milliseconds offset';
prints (to the trace)
creationTime: Sat Jan 01 2011 19:00:23 GMT-0300 (SA Eastern Standard Time)
milliseconds: undefined
It does not appear to be possible to access the properties of any Date object. The following prints nothing:
var currentTime = new Date();
for (var prop in currentTime)
trace(prop);
Am I missing something?You need to use testFile.creationTime.getTime() instead of testFile.creationTime.time.
-
Open Data Object - Open File attachment within pdf document
I am trying to build a script which will open file attachments embedded in a pdf document.
I have used the following javascript to list all embedded files within a document so I can retrieve the name
var d = this.dataObjects;
for (var i = 0; i < d.length; i++)
console.println("Data Object[" + i + "]=" + d[i].name);
The console reported:
Data Object[0]=MTP-300-X-1210_A.pdf
Data Object[1]=MTP-300-X-1240_A.pdf
I then used the following script to open the file
this.openDataObject("MTP-300-X-1210_A.pdf");
Console reports back as follows and does not open the file:
[object Doc]
Can anyone please offer assistance in how to open an embedded pdf attachment within a document?
Many thanks!Hi George,
I have used the same method app.openDoc to open attachments using a path associated with my computer. However, as you know, the method does not work if the pdf containing the attachment is located on a different computer. The app.openDoc method throws an error becuase the path is not valid.
I am trying to get the following code to work with no success:
var cFilePath = "|" + this.path + "|U:photo.pdf"'; // photo.pdf is the attachment
app.openDoc ({cPath: cFilePath});
The debugger throws an error.
However, if I take the content of the variable cFilepath and instert it as an argument within cPath parameter as a string literal, the app.openDoc method returns the docObject.
What's going on here? shouldn't the variable cFilePath work? Or do I need to specify a data type for the variable? Any thoughts would be helpful. I am using Windows 7, Adobe Acrobat X Standard. -
Problem with childs nodes and automatic key mapping in a Data Object
Hi experts!
I'm doing the service order tutorial from the mobile help at [this link|http://help.sap.com/saphelp_nwmobile71/helpdata/en/21/9b5b924c3b434fba4767731794b029/frameset.htm] and I have a problem...
In the topic "Modeling the Equipment Data Object", says you have to mark the "Automatic Key Mapping" checkbox. So when I had to create a third child node ( the location node ) the system raised an exception with the message "Deselect automatic key mapping flag for more than two-level nodes". I'm trying deselecting the flag and creating the location node, but when I want mark again the automatic key mapping flag, this is disabled.
What can I do to solve this and create the three child nodes with the flag marked? It's a configuration thing?
Any help it's very welcome. Thanks in advance.
Best regards,
Simon.The thing is: Its not allowed to use automatic keymapping if you have more than two levels. This is why the message showed up, and this is why its been disabled.
What automatic keymapping does: Figures out automatically which child node belongs to which parent (by guessing from the field name and type, which fields in the child correspond to which key fields of the parent).
On three levels, this becomes more complicated => Its disabled.
How to do keymapping yourself instead of having the DOE do it automatically: Do 'Explicit keymapping' from each child to its parent. Explicit keymapping is done by clicking on the corresponding menu button in the child node. Here you need to associate child node fields (they need not be key fields of the child, but they are allowed to be that as well) to each of its parent nodes key fields (so that each child can be associated to its parent).
Cheers -
Error while activating Data object in DOE workbench
Hi all,
I created a Data Object and when I try to activate that DO it is showing an error as below.
Mobile Java client attributes not maintained.
Please give some clue to resolve this.
Thanks and Regards,
Rajesh.AHi Rajesh,
I believe you had created an SWCV that is enabled for Backward Compatibility 'Uses NW04/NW04s MI application' and created a Data Object in this SWCV. Ideally, when the SWCV is enabled for Backward Compatibility, the Data Objects should be created by importing the text file as Data Objects from a MI 7.0 server. Since you have not done that way, you are getting this error.
I would suggest that you create a new SWCV and do not check the option 'Uses NW04/NW04s MI application'. Now create the Data Object again and try to activate it and you should be able to activate it.
Best regards,
Vinodh -
Unable to delete master data line items - Master data object CCHIUSRAM
Hello
We have an issue with the Master data Object CCHIUSRAM - CC Hier User Auth Maintenance. It has only master data and no texts no hierarchy. It is not time-dependent. It has /BIC/PCCHIUSRAM, /BIC/SCCHIUSRAM as database table only. This master data is not being used in any infoproviders.
In development client we are able to delete the line items of the Master data along with entering line items. RSRV check gives green for all checks.
In Test / Production client we are not able to delete the line items of the Master data. We are only able to enter master data lines and if we change any item then it creates another entry in the table.
Tried SE14 & RSDMD_DEL_MASTER_DATA - both does not help.
Did ST05 trace, could not find something concrete.
If any one has faced such an issue with any master data item then a response is much appreciated. It has become a bottleneck for us.
Many Thanks in advance
Pradip ParmarThanks for the response.
I can do this in EBD, but it is working fine in EBD. I cannot do this activity in EBP / EBT as the systems are closed and I cannot activate directly in EBT / EBP.
Besides, I have recently transported active versions of the object in EBT / EBP all again twice to see if it changes anything.
My guess is that, there is something stupid may be I am missing somewhere.
Any help is much appreciated.
Thanks -
Message class as result data object
hello brf+ users,
is it possible to use as Result data object in a Case expression a message from a custom message class?
thanks
danilothanks Carsten,
my requirement can be simplified in
IF FISCAL CODE
equals to " " then "001" ENTRY MISSING is returned
otherwise "000" check ok is returned.
where 000,001 are domain values of an element (MESSAGE RESULT).
can i use the message class as result? is there a way to anchor the result to the message class?
thanks
danilo
Maybe you are looking for
-
Missing A single HD TV Episode
I bought Season 2 of "Chuck" using the AppleTV, and was enjoying the final few episodes. I realized that the very last episode did not download. It downloaded in iTunes just fine in SD, but when I click check for downloads in iTunes and on the AppleT
-
How do I install software from cd-rom onto my IdeaPad S10?
I just received my IdeaPad S10. How do I install software from a cd-rom onto it? I tried putting my cd-rom in my regular laptop and copying it onto a flash drive and then copying it to the IdeaPad. The installation starts, then I get a message tha
-
Issue with Duplicate Merge Fields in PDFs
I have been utilizing merge fields from our Salesforce instance into our Forms and Contracts for a couple of years now and have never come across this issue. Since we utilize Salesforce, we will have certain merge fields duplicated on multiple pages
-
I have been trying to download Maverick on to my 2012 MacAir. It gets to 996MB and stops. A message says there has been an error in the download and to go to purchases and try again. It's the same every time I try. Any ideas?
-
hi, So I would like to know why I don't have the black feature when you write. In fact when I write something I didn't see something I tried to change the color. There's no changing it's like I can change the color but I click on the text window, it'