Update Date field automatically
When a user is adding a new entry I want two of the fields in the table to be automatically updated without the user knowing (hidden fields), I want a current date and time to be entered into the Updated Date field and the :APP_USER to be entered into the Updated_by VARCHAR2 field.
How do I go about doing this can I just put code to do so into the source of ITEMS or do I have to create a process?
Thanks
s
S,
Triggers are a good method, see this thread:
Re: Table Trigger Syntax
Jeff
Similar Messages
-
How can I update data fields in a merged document ?
Hi,
I'm looking for a way to update the values of data fields in a merged document with a script just as you can do with the user interface.
I don't find any method like "updateDataFields ()" in the DataMerge object.
Si I try to invoke the menu action "Update Data Fields", but it fails. The script error message is: "Error 53762, the script is not active." On the contrary, the action works if I use the interface.
Can anyone help me?
Thanks in advance,
FredIsnard
PS : I work with CS5.5 and JavaScript.Hi!
You might be looking for this one:
DataMerge.mergeRecords (outputOversetReportFile: File )
Merges records and produces an optional overset report.
outputOversetReportFile: Data Type: File
The path to the file in which to store the overset report. (Optional)
Best regards,
Andreas -
Error while updating Date Field on Process Form.
Hi,
I am using java code to pre-pop date on the process form.First I used a java code whic took java.sql.date as input and returned the same java.sql.date.But it gave an error that:java.lang.String cannot be converted to java.sql.date.......
So I changed the java code and now it takes string as input and returns java.sql.date. This code works fine for Pre-pop adapter and the date is populated on the process form.
But when i use the same code in a Process Task adapter to update the date, then it gives the following error:
ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.ADAPTERS - Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: Adapter Execution Error: updateDataObjFieldValuePost: error updating UD_OID_USR_DATE_OF_BIRTH
ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.ADAPTERS - Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: {1}
Can anyone suggest any method to update date field on process form?Hi Abhi,
Can you tell me how you have implemented populating an UDF based on Prepopulation of another UDF. I have a similar kind of requirement. It would be great if you share your code or relevant part of it.
Regards,
Sunny Ajmera -
Issue in Updating Date Fields in JDBC
Hi Experts ..
I am having issues in updating date fields in Oracle Database.
My Sender Sends date in format 2007-05-19T14:34:55.0000000+02:00
Can any one please suggest me how does the above format can be updated in JDBC with format 2007/05/19
Thanks !Hi,
See this Scree shot
http://img517.imageshack.us/my.php?image=16324662pf7.jpg
Take the Substring Function From Text Functionsand mention the position from 0 to 10 to take the Date alone from the Whole String which is getting in Source Field.
And after that apply the Transform date Function fron Date Functions and mention the source date format and the target date foramt that needs to convert into.
REgards
Seshagiri -
Update BOM revision no,date field automatically
Hi all,
My client requirement is this.
Whenever bom is changed using a change nomber ,Revision no,revision date field in BOM header should get updated automatically.
This is very urgent.Please guide me how to do the settings.
Thanks and Regards
SkumarDear,
Whenever a BOM is Changed,use a new Change number and against that Change number give the Reason for Change as some Revision level.
As for a material ,revision level can be made directly using T code CC11,but for a BOM , there is no direct T code for this.
Please refer this also,
Re: Revision Levels
Regards,
R.Brahmankar -
How to update 2 fields automatically rest manually on page
Hello folks,
I have got a question on how to update 2 fields in a table automatically (in my case this is one field for the user and one field for the correct date and time). This should happen automatically every time an user changes a row in the table. But it seems as if i cant change the fields i tried it with the changing of the textfield but he dont change the values in the database. I even tried a separate update statement but since this is set after the commitchanges() command it seems as if he ignores any following commands.
So anybody a good idea how i can change easily these two data fields? I just cant believe that you must manually change the fields, thats not the use of these 2 fields.
Thanks in advance for your help
AcinonyxTo be exact i have got a page with different fields which get their data from my database. Two fields which contain an userid and the other a date and time value should get updated automatically when the user changes something of the other values on this page and press a button which calls the commitchange method. But since this should happen automatically and not manually i cant put these changes in the database. The manual changes are saved without any problems but the automatical changes not. So my question is how can i change a value programmatically and make him save these canges in the database?
I already tried to put the new values in the fields or even detailed in the database but i cant get him to update these two fields.
Acinonyx -
I want to update date field in oracle table using database adaptor
Hi Guys,
I want to update date in oracle table field which is 'DATE' type , but i am getting following error.
Pure SQL Exception.
Pure SQL Execute of update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=? where CTRL_ID=? failed. Caused by java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
</summary>
</part>
- <part name="detail">
<detail>
ORA-01830: date format picture ends before converting entire input string
</detail>
i am formated the date using following code and assigned to one variable.
ora:formatDate(ora:getCurrentDateTime(),'dd-MMM-yyyy hh:mm:ss ')
this is update query
update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=#date where CTRL_ID=#id
Please provide solution.
regards
janardhanThe thing is that XSLT often doesn't deliver the functionality required when it comes to times.
You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned! -
Help with Updating Data Fields in Merged Document
I'm working in InDesign CS5 v7
I have a multipage report, all using one master page for about 80 seperate records. Each page has their own linked graphs/images.
We now have need to alter the source data, and while these alterations can be seen in 'Preview mode' on the Master Page, they are not carrying through into the pages themselves. No amount of 'Update Data Source' clinking changes this, and the 'Update Content Data Fields' remains greyed out...
I really don't want to have to remerge the whole document, as I will loose all of the linked graphs and images.
Can anyone help?You've seen the other thread, so I think you already know the answer...
-
Update Date Field in Table Row to SysDate
This appears to be an easy thing to do, but I can't figure out the best way to do it.
I have a table with 2 input text boxes and some output text boxes. When either input text box changes for a row, I need to update the date in one of the output text boxes in the same row to the current date. Then, when I commit the changes, the database should show the current date for that date field in that record.
I'm using JDev 11.1.1.6
Thanks,
RayAny help would be appreciated.
I figure the RowImpl class is being instantiated when the table loads. Is there a method in the RowImpl class that gets called when a row is changed? Should I have an action on my submit button that scrolls through all rows to see if any are dirty and update the date from there?
Please help. -
Update date daily automatically
If I wanted to have Dreamweaver update each day's date automatically how would I do that? For example, "updated xx/xx/xxxx."
You could do this with a script. Place the following script where you want the updated date to apprear. This will not work if the person has javascript turned off in their browser.
Jim
<script type="text/javascript">
datUpdated = new Date(document.lastModified) ;
datMonth = datUpdated.getMonth() + 1 ;
datDate = datUpdated.getDate() ;
datYear = datUpdated.getYear() ;
document.write("<em>Last Updated: " + datMonth + "/" + datDate + "/" + datYear + "</em>") ;
</script> -
Hi All,
I tried to update a date field to my database by using dataprovider, however, I got the following error "java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1 Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use." Anyone can help me to resolve this problem?Also, following:
http://blogs.sun.com/jfbrown/entry/using_creator_to_insert_into
http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/insert_row_in_table.html#4 -
Updating date field in db table.
Hi ,
I need to update a table which has a date field the and its of type dats.
i need to insert the date from the flat file. If the date field is blank it is updating in the table like
" / / ". if the date is 3/5/2006 it is updating properly.
if the date is blank the table should be inserted with null values . it should not have " / / " also.
can anyone help me on this.
Regards,
Rose.Use WRITE statement to transfer date into dats field.
DATA : v_date TYPE d ,
v_date1 TYPE d.
WRITE v_date TO v_date1.
Regards,
Shailaja -
Problem updating date field on user table
Hi,
I am having difficulty updating the value for a date field on a user defined table. All of the other fields update fine. Below is the code I am using. Does anyone have any suggestions? I have tried updating to both a date variable or a string variable. Thanks in advance for your help
Dim d As Date
d = CDate("01/01/2004")
pRecord.GetByKey (editForm.Items("Code").Specific.String)
pRecord.UserFields("U_CardCode").Value = editForm.Items("CardCode").Specific.String
pRecord.UserFields("U_CardNbr").Value = editForm.Items("CardNbr").Specific.String
pRecord.UserFields("U_CardType").Value = editForm.Items("CardType").Specific.String
pRecord.UserFields("U_ExpDate").Value = d
pRecord.UserFields("U_Name").Value = editForm.Items("Name").Specific.String
pRecord.UserFields("U_CVN").Value = editForm.Items("CVN").Specific.String
pRecord.UserFields("U_Addr1").Value = editForm.Items("Addr1").Specific.String
pRecord.UserFields("U_Addr2").Value = editForm.Items("Addr2").Specific.String
pRecord.UserFields("U_City").Value = editForm.Items("City").Specific.String
pRecord.UserFields("U_State").Value = editForm.Items("State").Specific.String
pRecord.UserFields("U_Zip").Value = editForm.Items("Zip").Specific.String
If editForm.Mode = fm_UPDATE_MODE Then
pRecord.Update
End IfI think I have figured it out. The cardtype field (which I was also updating) has a list of valid values. If I didn't specify a value for this field none of the other fields would update either. I'm still not sure of the reason for this behavior.
-
I don't want to fill the Actual GI Date field automatically when GI
Hi experts
When I post good issue a delivery, Actual GI Date field is filled automatically.
I don't want it.
I don't want the Actual GI Date field to be filled automatically.
Please, let me know how to.
With config or user exit, anything possible.
Thank you.Thank you for your reply Vinod.
But it's still not the exact answer I wanted.
1.
Subroutine USEREXIT_SAVE_DOCUMENT_PREPARE in MV50AFZ1 is not useful for this situation.
The field WADAT_IST(Actual GI Date) already has a value(today's date which is automatically inputted by system) in that subroutine.
So it's impossible to know whether Actual GI Date is manually inputted or not.
2.
The BADI you mentioned does not exist in our site.
Regards
Ji yeob -
How to update date field in oracle using jdbc
Hi all,
In my database i have a column LAST_UPDATED_DTTM which is used to store last updated date . when i try to update using the following query stmt
update MD_TABLE set LAST_UPDATED_DTTM= + " new java.sql.Date(c.getTime().getTime()) where PROD_ID=" + msdn ;
' c ' is instance of Calendar Class as below
Calendar c=Calendar.getInstance()
it gives the following error
ORA009:Expected date got number
can anybody please help with this?
Thank youcan't i do that without prepare statement?If you insist on stuffing that String, then format it in some convenient String format using SimpleDateFormat and call the TO_DATE function in Oracle, so that the database understands your Date too.
***Annie***
Maybe you are looking for
-
Hi all, I upgraded to iTunes 11 recently and have now purchased some additional content from the iTunes store. The files have been downloaded but do not show up in my library. A search yields some results but I cannot access the songs in my library n
-
On the new tab I get this message: Firefox prevented this page from automatically redirecting to another page.
-
How do I force the reader to open to full screen?
Is there a setting that forces the reader to open to a full screen when I open a doc from within a web site? It goes to the task bar first then having to click on it to see it full screen. Thanks, Mark
-
Result set --- can you reference in two locations (jsp and doVIew())
I need help figuring out what I am doing wrong. In my doView() function I am saving a result set NamingEnumeration person = details.executeDetails(fullname);I need to reference this result set from my doView method and inside my jsp page, this is w
-
Cap 8 - Increasing Slide Height Distorts Slide Objects
Hi everyone, I'm building a responsive project in Cap 8, and need to adjust the slide height on a number of slides to include scrolling. When I break the link and increase the pixel height, all of the slide objects resize larger in height and width.