Update column item in record
Hi, i have a tabular block that shows all the records in a table.
The problem is:
In a record, I want to update a field.
The code i'm using in "WHEN-BUTTON-PRESSED" trigger is:
UPDATE CLIENTES SET NOME=:PESQ_CLIENTES.NOME,MORADA=:PESQ_CLIENTES.MORADA,
TELEFONE=:PESQ_CLIENTES.TELEFONE,N_CONTRIBUINTE=:PESQ_CLIENTES.N_CONTRIBUINTE,LOCALIDADE=:PESQ_CLIENTES.LOCALIDADE
WHERE IDCLIENTE=:PESQ_CLIENTES.IDCLIENTE;
It doesn't work!!
I know that this way, i don't know the idcliente of the record that is being updated.
Then what should i do??
Is this code correct??
Thanks
This is the database table where i want to update some values in a record.
CREATE TABLE CLIENTES (
IDCLIENTE NUMBER(9) NOT NULL,
NOME VARCHAR2(20) NOT NULL,
MORADA VARCHAR2(30) NOT NULL,
TELEFONE NUMBER(9)NOT NULL,
N_CONTRIBUINTE NUMBER(9)NOT NULL,
LOCALIDADE VARCHAR2(20)NOT NULL,
CONSTRAINT CLIENTES_PRIMARY_KEY PRIMARY KEY (IDCLIENTE)
The fields should be set to UNIQUE??
I have tried to do that, but it still doesn´t work.
Or am i not understanding what you are trying to tell me!?
Sorry :(
Similar Messages
-
Received this error (The workflow could not update the item, possibly because one or more columns for the item require a different type of information.) recently on a workflow that was
working fine and no changes were made to the workflow.
I have tried a few suggestions, i.e. adding a pause before any ‘Update’ action (which didn’t help because the workflow past this action without incident); checked the data type being written
to the fields (the correct data types are being written); and we even checked the list schema to ensure the list names and the internal names are aligned (they
are), but we still cannot figure out why the workflow is still throwing this error.
We located the area within the workflow step where it is failing and we inserted a logging action to determine if the workflow would execute the logging action but it did not, but wrote the same error message.
The workflow is a Reusable Approval workflow designed in SharePoint Designer 2010 and attached to a content type.
The form associated with the list was modified in InfoPath 2010.
Approvers would provide their approval in the InfoPath form which is then read by the workflow.
Side note - items created after the workflow throws this Unknown Error some seem to be working fine.
We have deleted the item in question and re-added it with no effect.
Based on what we were able to determine there don’t seem to be any consistency with how this issue is behaving.
Any suggestions on how to further investigate this issue in order to find the root cause would be greatly appreciated?
CheersHi,
I understand that the reusable workflow doesn’t work properly now. Have you tried to remove the Update list item action to see whether the workflow can run without issue?
If the workflow runs perfectly when the Update list item action is removed, then you need to check whether there are errors in the update action. Check whether the values have been changed.
Thanks,
Entan Ming
Entan Ming
TechNet Community Support -
I got error "The workflow could not update the item, possibly because one or more columns for the item require a different type of information "I found out the cause is Update Item action
I need to update item in another List call Customer Report ,the field call "Issues" with data type "Choice" to yes
then the error arise . please help..Thanks for the quick response Nikhil.
Our SPF 2010 server is relatively small to many setups I am sure. The list with the issue only has 4456 items and there are a few associated lists, eg lookups, Tasks, etc see below for count.
Site Lists
Engagements = 4456 (Errors on this list, primary list for activity)
Tasks = 7711 (All workflow tasks from all site lists)
Clients = 4396 (Lookup from Engagements, Tslips, etc)
Workflow History = 584930 (I periodically run a cleanup on this and try to keep it under 400k)
Tslips = 3522 (Engagements list can create items here, but overall not much interaction between lists)
A few other lists that are used by workflows to lookup associations that are fairly static and under 50 items, eg "Parters Admin" used to lookup a partners executive admin to assign a task.
Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties. -
Combine checked item and update column
Hi all,
need to design a screen that allow user to update column (code) and also pick which statement to display for the next stage. My thought was to create a checkitem and LOV display. Once user has checked the box , the process should update the code first then select the checked item into a new table. But it appears to me I can get checked item cocept to work and inserted it to a new table but fail to address the LOV update. Can you help ?
table: sample1, display as the following
seq code comments amt
1 T test1 30
2 A test2 20
3 T test3 80
4 T test4 20
user action: picked seq 1,2 and update code from A to T for seq2
==> process will insert the selected statement to result table
table:result
seq code comments amt
1 T test1 30
2 T test2 20musharI am sorry . Just realized I posted this to a wrong forum.
-
Hi,
We have a requirement to update a column value once the item has been approved.
Following settings have been made in the publishing articles list:
Require content approval for submitted items : yes
Create major and minor (draft) versions
Who should see draft items in this document library? :Only users who can edit items
Require documents to be checked out before they can be edited? : yes
I have createdatu a Sharepoint 2013 workflow to check if Approval sts of current item = 0 i.e. Approved , then check out and update the item and finally checkin the item. Everything works fine till this point except that the minor version of the item is
checked in. Due to this the updated columns are not published to others.
Also, I created a Sharepoint 2010 workflow to SET CONTENT APPROVAL = APPROVED and started this workflow from my list workflow above, but the item does not get checked-in and always shows "In Progress" status with comment "The item is currently
locked for editing. Waiting for item to be checked in or for the lock to be released.".
Please let me know where I am missing out so that once the item is approved, column value gets updated and current item is still in Approved status.
ThanksHi,
According to your post, my understanding is that you want to update Column value after current item is Approved and then publish major version using Sharepoint 2013 designer workflow.
You will get into this kind of Catch-22 situation trying to set the Content Approval Status in SharePoint Designer workflow:
- You must check out the document before you can change the Content Approval Status
- You can't change the Content Approval Status once the document in checked out
Since you set the Require documents to be checked out before they can be edited=Yes, you will need to check out the document when run the workflow on the item. But you cannot approve a document when it is checked
out. So the logic in workflow conflicts.
As a workaround, you can use the Start Another Workflow action to start the normal Approval workflow on the document. The built-in Approval workflow can work with a document that’s not checked out.
The designer approval workflow also can work with a document that’s not checked out.
You can create two workflow using SharePoint Designer 2013.
First, create a SharePoint 2010 platform workflow.
Then, create a SharePoint 2013 platform workflow.
Then when the SharePoint 2013 platform workflow start, it will start the SharePoint 2010 platform workflow to set content approval status, then the SharePoint 2013 platform workflow will update current item value.
More information:
SharePoint Designer Workflow Content Approval Issue
SharePoint 2010 Approval Workflow with Content Approval
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Hello Everyone,
How to update zero to a column value when record does not exist in table but should display the column value when it exists in table
Regards
Regards Gautam SAs per my understanding...
You Would like to see this
Code:
SELECT COALESCE(Salary,0) from Employee;
Regards
Shivaprasad S
Please mark as answer if helpful
Shiv -
Update column data to Upper Case in parent and child table
Hi ,
I am facing issue while updating column value to upper case in parent table and child table. How can i do that ?
when updating parent row:
ORA-02292: integrity constraint (XXXXXXXXXXXXXX_FK) violated - child record found
When updatng corresponding child row:
ORA-02291: integrity constraint (XXXXXXXXXXXXXXXX_FK) violated - parent key not found
how can i update on both the places ?
Regards,
AAI am facing issue while updating column value to upper case in parent table and child table. How can i do that ?
Why do you need to do that?
That is just ONE of several questions you should answer before you start modifying your data.
1. What is your 4 digit Oracle version? (result of SELECT * FROM V$VERSION)
2. If both values are the same case what difference does it make what that case is?hen you don't need to alter your original data.
3. What is the source of the column values you are using now? If you change your data to upper case it will no longer be identical to the source data.
4. What is your plan for enforcing future values to be stored in UPPER case? Are you going to use a trigger? Have you written and tested such a trigger to see if it will even work the way you expect?
5. Why aren't you using a surrogate key instead of a 'business' data item? You have just demonstrated one reason why surrogate keys can be useful: their actual value is NOT important.
You should reexamine your problem and architecture and consider other alternatives.
One alternative is to add a new 'surrogate key' column to use as the primary key. Just create a new sequence and use a trigger to populate the new column. Your current plans will require a trigger to perform the case conversion so instead of the just use the trigger to provide the value.
If the change is being done to facilitate searching you could just add a VIRTUAL column UPPER_MY_COLUMN and index that instead. Then you could search on that new virtual column and the data values would still be identical to the original data source. -
SQL Report with 1 updatable column - help urgent
Hi,
I have a SQL report. I am using collection to store value of selected record by link column.
I have a updatable text item (NULL) in the column. I am able to store that value in the collection.
Any clue?
Code
1. Creating a collection in parent page:
apex_collection.create_or_truncate_collection
(p_collection_name => 'ORDER');
2. Query to populate item rows with option to key 'QTY' before pressing 'Add to Order' link.
select
itemcode,
description,
NULL AS qty,
'Add to Order' add_to_order
from itemtab
3. Made 'QTY' to Text item -- to allow users to key value
4. Created 'hidden & protected' items P1_ITEMCODE, P1_QTY
5. Set values of itemcode, qty in add_to_order link
6. Created a process to add values into collection:
for x in (select * from itemtab where itemcode = :P1_ITEMCODE)
loop
apex_collection.add_member(p_collection_name => 'ORDER',
p_c001 => x.ITEMCODE,
p_c002 => x.DESCRIPTION,
p_c003 => :P1_QTY
end loop;
7. Display value of itemcode, description, qty in report region
select c001, c002, c003
from apex_collections
where collection_name = 'ORDER'
Probem: The value of qty is not being stored in the collection and not appearing in the #7 report. itemcode and description values are fine.
Thanks,
DipDip,
I'm guessing here as I can't see your application, I think your missing the page process to collect the data from your QTY field.
I created a quick demo of what i think your trying to achieve on apex.oracle.com
http://apex.oracle.com/pls/apex/f?p=19923:2
I added this to the html expression on the report Field add to:
<input type="button" onclick="doSubmit(#RANDOM_ID#)" value="Add To" />
Then the page process to collect and set the page item:
DECLARE
l_qty number;
BEGIN
FOR i in 1..APEX_APPLICATION.G_F03.COUNT LOOP
l_qty := nvl(APEX_APPLICATION.G_F03(i),0);
IF l_qty > 0
THEN
:P2_QTY := l_qty;
:P2_RANDOM_ID := :REQUEST;
EXIT;
END IF;
END LOOP;
END;
Let me know if this helps
Mark
Don't forget to mark reply as helpful or correct as this may help others reading this thread in the future!
Edited by: cptbutcher on Mar 25, 2010 10:40 PM -
Hi all
I have a requirement in oracle forms 6i
I have a data block which is tabular
there are 5 columns
1 column is display only and other 4 are normal text fields where we can insert update and delete those records
My requirement is when a user updates a record an alert must fire and the alert should ask whether the user wants to update that particular record
if the user presses yes then the record should be updated else the record should show as it was previously shown
Similarly in case of delete an alert should fire where it should be asked for confirmation if the user presses yes then the record should be deleted from the data base
else the record should be again visible on the form as earlier
also my 3rd requirement is that
i have a item field which is normal text and the display only field is the description
when entering a new record when i enter the item field and press tab or navigate out of the item field then the description of the item should be pouplated into the decsription read only field
Please help me in the above 3 cases
I am new to forms
I am using a friends ID which has many posts
Thanks in advance1)
your first requirement i'd do in the PRE-UPDATE trigger of the block:
DECLARE
v_alert_button NUMBER;
BEGIN
v_alert_button := SHOW_ALERT('your_alert'); -- "Do you want to update?"
IF v_alert_button = ALERT_BUTTON1 -- assuming "No"
THEN
-- reset value:
:YOUR_BLOCK.YOUR_ITEM1 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', DATABASE_VALUE);
-- optionally set item to valid if you don't want validations to fire:
SET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', ITEM_IS_VALID, PROPERTY_TRUE);
-- do this for every item:
:YOUR_BLOCK.YOUR_ITEM2 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM2', DATABASE_VALUE);
-- finally reset record status:
SET_RECORD_STATUS(:SYSTEM.CURSOR_RECORD, STATUS, QUERY_STATUS);
-- interrupt PRE-UPATE trigger:
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;(not tested, please try for youself)
2)
raise the alert in PRE-DELETE trigger.
3)
you can do this within the WHEN-VALIDATE-ITEM trigger or a List-of-value (LOV) that returns the description values. -
Display an alert message through javascript when report column item is null
Hello,
I have a report column item which is an select list item and now i want to display an alert message when value is null, I mean no value is selected, this alert message should be fired when update button is clicked.
Can anyone please help me with this issue.
Thanks,
OrtonYou could try something like this:
declare
x INTEGER;
err_ct INTEGER := 0;
begin
x := 5; -- number of rows displayed
for i in 1 ... x (
IF wwv_flow.g_f08(i)) IS NULL THEN err_ct := err_ct + 1;
END IF;
end loop;
IF err_ct = 0 THEN
RETURN NULL;
ELSE
RETURN 'Nice error message: you must supply a value.';
END IF;This would be used with a PL/SQL validation: Function Returning Error Text. -
Mass Update Column In Tabular Form
Hi,
I'm trying to create a tabular form that has a mass update column function. i.e. the tabular form will be displayed as normal but at the top of certain columns will be a text box or lov and what ever is entered into those boxes will be cascaded into the empty values in that column without refreshing the page.
Hope that makes sense.
I've search the forum but cant find reference, is this possible.
Thanks AndyHi,
Just wondering if anyone had any thoughts on this.
I can get the text to populate another cell e.g.
http://mlw-mis-2/dev/apex/f?p=174:4
But how can i get it to reference a column, this is what I'm using to reference another item
onKeyUp="f_getTextUpper('P4_COL1','P4_TEXT')"
and I've tried changing the P4_TEXT to other things like
apex_application.g_f03 (vRow)
apex_application.g_f03 (i)
apex_application.g_f03
But with no luck -
Sharepoint 2013 web service to update column content
I have a folder in a sharepoint list. Folder have columns ie Title, modified by, modified date, details. I am trying to update details column content with csharp code for that folder. I am trying to find sharepoint service method to update a column content
for a list item.
Added my sp site service ex: http://mysite/_vti_bin/Lists.asmx as reference
I included service reference in my project and create object.
I am referrring the below service to check if I can use any method from it but unable to find it. Do we have any method to
https://msdn.microsoft.com/en-us/library/ms774680(v=office.12).aspx
SriHi Sri,
Per my understanding, you might want to update item using Lists Web Service.
In Lists.asmx, the methods available are as below:
https://msdn.microsoft.com/en-us/library/lists.lists_members(v=office.12).aspx
I suggest you follow the documentation below about updating list item using Lists Web Service for a try in your environment:
https://msdn.microsoft.com/en-us/library/office/ms440289(v=office.14).aspx
Thanks
Patrick Liang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Int Server (ABAP Cache) - Cache Updated column shows "red"
...long read, appreciate your patience...
In the IB:Config, under Cache Notifications, I'm getting the red square in the Cache Updated column for all "ABAP Cache" entries (green for notification). The "Java Cache" and "Central Adapter Engine" entries are green all the way through.
I've read a bunch of other threads here, and I've read and worked through the entire "How to Handle Caches" document. I ran in to a couple issues, but I don't know how to solve them.....
1) When I run SXI_CACHE, I receive the following messages:
<green> "Cache contents are up to date"
<red> "Error during last attempt to refresh cache"
--->double-clicking shows: Error ID = BUSINESS_SYSTEM, Message = LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM
--->Running the LCR... fxn via SE37 is successful, so I don't understand why SXI_CACHE has a problem running it.
2) When I run the Cache Connectivity Test where the Yellow triangle is displayed for the IS-ABAP with message "Attempt to fetch cache data from Integration Directory not yet started or still in progress".
3) When I try to load http://<host>:<port>/CPACache/refresh?mode=delta or full, I get a "403 Forbidden - You are not authorized to view the requested resource." But I'm never prompted for a user/pw? Since I'm the only user in this XI box, I do have some of my logons saved in Internet Explorer - could it be using one of those without prompting me?
Note:
I have been experiencing on and off network issues, and the machine we have XI installed on is slow. I don't know if that could affect anything or not.
Thanks for taking the time to read this...
Brian
Message was edited by: Brian VanderwielThanks for the replies...
Prashanth,
I think SXI_CACHE is for items in the Java stack only (correct me if I'm wrong). The main problem I have is with items in the ABAP stack not making it in to the cache.
Moorthy,
I walked through the Readiness Check - everything passed except for the items I already mentioned (Cache test shows yellow). The document is a nice gathering of tests, but it doesn't offer any ideas has to how to correct problems encountered.
Integration_directory_hmi tested successfully, and I read through the other OSS Notes, but none solved the issue. -
Update FI item text from PO item text
Hi all,
i am trying to update FI item text(bseg) from PO item text(ekpo).I know that bseg is a culster table therefore inner join is not allow.So is there a way i can join these two tables together so i can retrieve the line item and then i'll do a modify to update into FI item text.I have tried the various codes that are posted within this forum but can never get anything to write:/ out.
I've manage to retrieve the various info from PO (ekpo) and also manage to update the FI text field with some random words(but both seperately).What i need now is to create a link between bseg and ekpo.
I have attached my coding for better understanding..Thankss
REPORT ZSTKLILINTEST3 LINE-SIZE 1023 LINE-COUNT 1023 NO STANDARD PAGE HEADING.
Table Declaration
TABLES: ekpo, ekko, bseg, zstkll_1.
Types Declaration
TYPES: BEGIN OF t_bseg,
ebeln LIKE bseg-ebeln,
hkont LIKE bseg-hkont,
END OF t_bseg,
BEGIN OF t_ekpo,
ebeln LIKE ekpo-ebeln,
txz01 LIKE ekpo-txz01,
bukrs LIKE ekpo-bukrs,
ebelp LIKE ekpo-ebelp,
hkont LIKE bseg-hkont,
END OF t_ekpo.
Data Declaration
*grab data from t_ekpo then append it to zstkcy008
DATA: ekpo_tab TYPE STANDARD TABLE OF t_ekpo WITH HEADER LINE,
bseg_tab TYPE STANDARD TABLE OF t_bseg WITH HEADER LINE,
zstkll_1_tab TYPE STANDARD TABLE OF zstkll_1,
wa_zstkll_1 LIKE LINE OF zstkll_1_tab.
Selection-Screen
SELECT-OPTIONS: s_bukrs FOR ekpo-bukrs,
s_ebeln FOR ekpo-ebeln,
s_hkont FOR bseg-hkont.
INITIALIZATION EVENT
AT SELECTION-SCREEN EVENT
START-OF-SELECTION
START-OF-SELECTION.
SELECT bukrs
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE ekpo_tab
WHERE bukrs IN s_bukrs.
IF ekpo_tab[] IS NOT INITIAL.
SELECT ekkoebeln ebelp bedat txz01 ekkobukrs
FROM ekpo INNER JOIN ekko
ON ekpoebeln = ekkoebeln
INTO CORRESPONDING FIELDS OF TABLE ekpo_tab
FOR ALL ENTRIES IN ekpo_tab
WHERE ekko~bukrs = ekpo_tab-bukrs
AND ekko~ebeln IN s_ebeln.
WRITE:/ 'Extracted Data:'.
LOOP AT ekpo_tab.
MOVE-CORRESPONDING ekpo_tab TO wa_zstkll_1.
WRITE:/ ekpo_tab-bukrs, ekpo_tab-ebelp, ekpo_tab-txz01, ekpo_tab-ebeln, ekko-ebeln, ekko-bedat.
AT END OF ebeln.
APPEND wa_zstkll_1 TO zstkll_1_tab.
ENDAT.
CLEAR: wa_zstkll_1, ekpo_tab.
ENDLOOP.
SKIP 2.
TRY.
CLEAR sy-dbcnt.
INSERT zstkll_1 FROM TABLE zstkll_1_tab.
CATCH cx_root.
WRITE:/ 'Record(s) already exist!'.
ENDTRY.
WRITE:/ sy-dbcnt, ' Records are inserted.'.
ELSE.
WRITE:/ 'No data Selected.'.
ENDIF.
END-OF-SELECTION
END-OF-SELECTION.
REPORT ZSTKLILINTEST13.
TABLES:bseg.
DATA:it_bseg LIKE bseg OCCURS 0 WITH HEADER LINE.
PARAMETERS:p_belnr LIKE bseg-belnr,
p_bukrs LIKE bseg-bukrs,
p_gjahr LIKE bseg-gjahr.
START-OF-SELECTION.
SELECT * FROM bseg INTO TABLE it_bseg WHERE belnr = p_belnr AND bukrs = p_bukrs AND gjahr = p_gjahr.
MOVE 'IF THIS APPEAR UPDATE IS SUCCESSFUL' TO it_bseg-sgtxt.
MODIFY it_bseg FROM it_bseg TRANSPORTING sgtxt where belnr = p_belnr AND bukrs = p_bukrs AND gjahr = p_gjahr.
LOOP AT it_bseg.
WRITE:/3 it_bseg-belnr, it_bseg-gjahr, it_bseg-sgtxt.
ENDLOOP.
MODIFY bseg FROM TABLE it_bseg.
COMMIT WORK.
IF sy-subrc EQ 0.
WRITE:/3 'BSEG TABLE UPDATED SUCCESSFULLY WITH TEXT'.
ENDIF.self solved
-
Purchase Orders - Updating Line Items After a Portion Has Been Received
Is there any way to make a line item editable on a purchase order if only a portion of it has been received?
Basically, our company will create a Purchase Order in SAP, which goes to our office in Hong Kong to arrange shipment. These Purchase orders will, many times, have multiple items listed at, let's say, 10,000 pieces each. Each of the items may ship on different dates due to our request for different dates or due to limited container space. So really...each item on the Purchase Order is like a "mini purchase order"... as I like to call it.
So, when we have a situation where only 5,000 of a specified item has been sent, we create a Goods Receipt for that amount...making that line item un-editable on the Purchase Order.
I would like for it to be editable so that I can add/change the the "Status Update" column I created (this is for our sales reps to be able to determine when product should be arriving).
The only solution I can think of is readjusting the quantities right when we know they will be split...so by the time they arrive (usually a month after they are shipped from Hong Kong), the quantities are already separated out in the system.
Only thing is, I have to be REALLY careful not to mess up the original order...or confuse things.
Any suggestions??There is a good reason that a line item will become non-editable on a purchase order if a portion of it has been received.
Do not fight with system. If possible, change the order to small one from the beginning. That would be much better.
Thanks,
Gordon
Maybe you are looking for
-
What's going on with the Chromium browser packages ?
They are too many ! 1 bin32-cxchromium--> An old chromium package. Do we need it ? 2 chromium-browser-{buildnumber}~-svn{date}{upstreamrev} --> it's the repackaged deb of a rebuilt svn chromium. 32bit only. 3 chromium-browser-dev --> OK. it's the sam
-
Can't access my online banking log in- plug in missing?
can't access my online banking log in- plug in missing?
-
How to see the person entered in FBL3N and FBL1n
Gurus, Can some one tell me how will I be able get the name of the user who did the entry - when I run FBL3N, FBL5N and FBL1n. In the layout I do not have an option to select the "entered by". Please help me. Thanks in advance Deepak
-
Hello, Pls a hint for this abap error: ERROR: Syntax error in program /CPD/CL_PWS_WS_CP_REPEAT_COL==CP . (termination: RABAX_STATE) What happened? Error in the ABAP Application Program The current ABAP program "CL_ABAP_TYPEDESCR=============C
-
Hi When tried to take backup on the Windows server 2008 R2 it is getting failed even thought Vssadmin writers are stable on the server. And we are able to take syatem state backup for the server but we could not take the actual backup for the server