How to update a field without saving in the db
Hello,
I have a page in htmldb with 2 fields (new value, existing value).
This page is used by the user to validate if they want to use the new value or to keep the old one.
I have created a button and a process. When the button is pressed, I would like the field "new value" is updated with the "old value" but only in htmldb. The user should still click on save to change the value in the db.
Can someone tell me what is the attribute and the parameter of the process to do this ?
Thanks in advance
Michael
Hello,
>> I would like the field "new value" is updated with the "old value"
You can do that by attaching a simple JavaScript code to your button (http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/bldapp.htm#CIHFEEGH ).
Assuming you have a Pxx_NEW and Pxx_EXIST items, the code should be similar to the following:
<script type="text/javascript">
function copyValue() {
$x(‘Pxx_NEW’).value = $x(‘Pxx_EXIST’).value;
<script>Of course, for more generic use, you can add parameters to the function.
Hope this helps,
Arie.
Similar Messages
-
How to update key fields for table
Hi,
how to update key fields for a table.The update statement is not working for the same.
Regards,Hi,
See the below example.
TABLES SPFLI.
DATA WA TYPE SPFLI.
MOVE 'AA' TO WA-CARRID.
MOVE '0064' TO WA-CONNID.
MOVE 'WASHINGTON' TO WA-CITYFROM.
UPDATE SPFLI FROM WA.
MOVE 'LH' TO SPFLI-CARRID.
MOVE '0017' TO SPFLI-CONNID.
MOVE 'BERLIN' TO SPFLI-CITYFROM.
UPDATE SPFLI.
CARRID and CONNID are the primary key fields of table SPFLI. All fields of those lines where the primary key fields are "AA" and "0064", or "LH" and "0017", are replaced by the values in the corresponding fields of the work area WA or the table work area SPFLI.
Regards,
raj. -
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 have a used mac computer. I want to sync and update my iphone. Currently itunes tells me that my iphone is connected to a different itunes account and will sync, but delete everything from my phone. How do I make itunes sync and update my phone without deleting all the current information on my phone?
Iphone will sync with one and only one cpomptuer at a time. Syncing to another will erase the current content and replace with content from the new computer. This is the design of the iphone.
It will erase the content when you sync.
Why not update from the comptuer with which you normally sync? -
Hi frnds,
How to update single field data in Z table .
I am taking data from screen, when i press update button the data will store specific field data in Z table.Dear Rakhi,
You can use the below syntax.
Hope this would solve your problem.
LOOP AT tpra INTO wpra.
UPDATE zpra
SET pra2 = wpra-pra2
WHERE pra1 = wpra-pra1.
ENDLOOP.
In WHERE give KEY VALUES
In SET give the particular value that has to be changed.
Regards,
Pintoo
Edited by: pintoo2805 on May 18, 2010 7:10 AM -
How to update ABSKZ field in the table EKPO
Hi
Is there any way to update the rejection indicator (ABSKZ) field of table EKPO?.
I am looking at BAPI_CHANGE_PO FM, But it does not have ABSKZ field in the item structure BAPIMEPOITEM.
Do I need to extend the BAPI structure with ABSKZ field ?
Regards
Raj.Hi
To extend BAPI_PO_CHANGE for EKPO-ABSKZ field , we have to add field in the structure BAPI_TE_MEPOITEM to pass it to EXTENSIONIN. As ABSKZ field already availble in the EKPO it is not allowed to add ABSKZ in the structure BAPI_TE_MEPOITEM. it is throwing below error message.
Field ABSKZ in table EKPO is specified twice. Please check
Since it is not Z field and also not availble in the structure BAPIMEPOITEM not sure how to update ABSKZ field in the EKPO table.
Please advice.
Regards
Raj -
I just bought my cousin's ipod, and I want to update it on my computer. However, it needs authorization from his account to keep all the apps, and he's already authorized it on 5 computers. How can I update this ipod without losing all the apps?
You cannot use someone else's apps without violating the license agreement. The apps are tied to the owner (via Apple ID). The right thing to do would be to update and start fresh.
-
How to update an app without changing drilling info in app store
how to update an app without changing drilling info in app store
Assuming you mean "billing info", why would would you need to change it?
-
I recently changed my email address and need to change my icloud account on both my itunes and iphone. How do I do this without completely wiping the phone.
Also I tried to update to iOS6 and it is asking for my password under my old signin and locked me out of my phone.
What can I do?
ThanksThis explains how to change your ID: http://support.apple.com/kb/HT5621. After changing your ID you will need to go to Settings>iCloud, delete the existing account (which only deletes it from your device, not from iCloud), then sign back in with the new ID. To avoid losing photo stream photos, save them to your camera roll before deleting the existing account.
If you are signed into your account on your Mac, you will need to go to System Preferences>iCloud, sign out, then sign back in with the new ID. -
In VIEWING (to print) my iTunes music (in finder), how can i view subfolders without clicking on the triangle of each main folder?
I am trying to print a list of all my music. For example, main folder is BEATLES. Subfolders are Magical Mystery Tour, Yellow Submarine, Abbey Road, etc...
and I want to view and print all the subfolders. This is a recovery project after my hard drive failed. I know this is truly a "finder" question and will double post there.
Thanks.
Amyamy lynn wrote:
way too much ink.
Don't know what this means but okay. -
How do I access my files saved in the cloud
Once I filled/edited files on acrobat, I am unable to print or save, but it shows that it's automatically saved in the Cloud. How do I access my files saved in the Cloud and how can I print the edited files?
Welcome to the Apple Community.
How did you store them in the cloud (back up or photo stream) and where do you want to view these photos. -
How to map journal fields and whats is the better process type
/Journal/JournalSuspenseCostCentre NULL
/Journal/JournalBalancingCentre Lookup from Organisation ID
/Journal/JournalMultiCompany u2018Nu2019
/Journal/JournalBatchNumber NULL
/Journal/JournalNumTransactions Total number of /Journal/JournalLine transactions
/Journal/JournalBaseDRTotal Sum of /Journal/JournalLine/JournalLineBaseValue u2013 Debit Values only
/Journal/JournalBaseCRTotal Sum of /Journal/JournalLine/JournalLineBaseValue u2013 Credit Values only
How to map journal fields and whats is the better process type idoc/proxies?please let me know
Journal Line
Multiple journal lines per header:
Schema Element Data
/Journal/JournalLine/JournalLineCostCentre Bank account control Cost Centre
/Journal/JournalLine/JournalLineAccount Bank account control Account Code
/Journal/JournalLine/JournalLineMoneyTotal Transaction Line Amount
/Journal/JournalLine/JournalLineVolume NULL
/Journal/JournalLine/JournalLineDescription Payee Name
/Journal/JournalLine/JournalLineChequeBookReference NULL
/Journal/JournalLine/JournalLineMatchField Cheque Number
NB Contra accounting entries should be posted to:
Schema Element Data
/Journal/JournalLine/JournalLineCostCentre Bank account control Cost Centre
/Journal/JournalLine/JournalLineAccount Bank account control Account Code
/Journal/JournalLine/JournalLineMoneyTotal Transaction Line Amount * -1
/Journal/JournalLine/JournalLineDescription Payee Name
/Journal/JournalLine/JournalLineMatchField Cheque Number
/Journal/JournalPeriod Current General Ledger Period
/Journal/JournalYear Current General Ledger YearIt looks you are new to PI,
you have to develop scenario end to end, by creating source data type and target data type(if you have XSD's not required),then use Graphical mapping (message mapping) to map source and target structures.
Search in sdn for one end to end scenario you will understand easily
Regards,
Raj -
When I take pictures using the front camera the photo saves as if it were flipped in the opposite direct. How do I get it to saved as the picture was originally taken?
If you are talking about landscape pictures, hold the phone so the camera is at the top and the volume buttons on the bottom. If you hold it with the volume buttons on the top, the camera is upside down.
-
I am from the Philippines btw. What I meant is, I cannot text someone ordinarily when the net is turned on, and it assumes to be texting through iMessage. How will I text someone without turning off the internet in an ordinary way, not in iMessage? Thank you.
I Tried that already, but if i turned it off, I cannot send an imessage to people I want to text through imessage. There are people in my contacts that when I text, it is automatically as text message, while there are some that when I text, it is through iMessage automatically, and I just want through text message also. And for the latter, I still need to turn off the wifi in my phone for them to be texted through iMessage, which is more hassle.
-
Hi all,
After my last contribution "Request for Scott Spendolini" I was able to create the scripts to update fields in forms without having to refresh the page. Thanks again to Scott, Carl and the others who helped me solving my problem.
I have another question regarding this however. How do I combine two (or more) values on a form to fill a field with the values, for instance to create a unique Primary-key field?
This is the example: combine the postcode and the house-number (and maybe an extension to the housenumber) in one field 'adrescode'. This uniquely identifies an adress in the Netherlands. I can 'get' the postcode to fill the first part of the adrescode, but how do I modify the scripts to 'get' the housenumber (huisnummer) and - if not left null - the extension to the housenumber?
Here are the scripts I created to far:
in the region source of the page I have the following Javascript:
<script language="JavaScript1.1" type="text/javascript">
function f_P52_getAdrescode ()
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=P52_getAdrescode',0);
get.add('P52_POSTCODE',html_GetElement('P52_POSTCODE').value)
gReturn = get.get();
if(gReturn)
{ html_GetElement('P52_ADRESCODE').value = gReturn }
else
{ html_GetElement('P52_ADRESCODE').value = 'null' }
get = null;
</script>
and in the shared components of the application I have created an process P52_getAdrescode as follows:
declare
l_adrescode varchar2(16);
begin
l_adrescode := :P52_POSTCODE || :P52_HUISNR ;
if :P52_HUISNRTOEVOEGING is null then
NULL ;
else
l_adrescode := l_adrescode ||':'||:P52_HUISNRTOEVOEGING ;
end if ;
htp.prn(l_adrescode);
-- dbms_output.put_line(l_adrescode);
end;
I ran this PL/SQL in the SQL-section of HTMLDB and it does what a expect: combine the values in a new string.
In my page however, it only gets the value of postcode and puts this into the adrescode field.
So my question is: how do I modify the Javascript (I Guess) so that also the fields 'huisnummer' and 'huisnummertoevoeging' end up in the adrescode field?
Thanks for your help,
Jan.Carl, Scott,
I have two pages with exact the same fields and codings (as described before in this Post.
I now have two different named functions and application processes, a javascript an process for each page. They both do the same thing, use the same code except for the page-number (:P52_ and :P92). I tried to make one process to replace both, but ran into problems when I changed the name in the get.add statement.
Changing the get.add from: get.add('P52_POSTCODE',html_GetElement('P52_POSTCODE').value) to: get.add('POSTCODE',html_GetElement('P52_POSTCODE').value) always ends up in what looks like a complete html-(source)dump of the page in the field that has to be updated. Even when I replace the :P52_POSTCODE in the application process as well Changing back the application process and the javascript to so that both javascript and process use the :P52_ again and the function returns the correct value again. What am I doing wrong?
I requested an online-workspace to post the application to it, but have no answer to my request yet, so I can't provide a working example at the moment....
Thanks for your help again,
Jan.
Maybe you are looking for
-
Can not get data from database
hi all, there is a problem , when i write like below : SELECT * FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp WHERE bukrs = p_bukrs AND hkont = p_hkont. p_bukrs , p_hkont are all on the selection screen , and p_bukrs
-
Notes and Location field disappear in iCal when I add invitee
What's up with this? Also, once I add an invitee and hit Return, I can't delete the person. I'm getting a question mark icon next to everybody, which is silly because AddressBook was used to make the suggestions I typed in. Running Snow Leopard 10.6
-
Error on activating the table "DB length of the key of table too large"
Hi Experts, I am getting the error while activating my table PSM_REQ_BO_ELM_NAME. Activation error log is as follows "DB length of the key of table PSM_REQ_BO_ELM_NAME is too large (>900)".. I have a table which has 4 filed as key one with char 6 an
-
HT201269 iPod to iPhone connection
Is it possible to download my music from my iPod directly to my new iphone5 without using iTunes or iCloud? I have a camera adapter that will fit into the iPod that has a USB port on the other side that the cord for the iPhone will plug into.
-
Hello, I've inherited an old Win 2000 server. On it there are several shares that I'm forced to move on a 10.6.7 server.. I've added this 10.6 server in the AD and moved on it those shares, and I've assigned necessary ACL on them. It's something sim