Tabular form - how to set a field to a constant?
I'm using a tabular form to update a table - and this works. Then I remembered that I need to also update the field that keeps track of who made the change.
Setting this field via the SELECT (e.g. Select 'userX' as editor from ...) for the tabular form fails due to a db concurrency error (MRU 20001) upon submission.
Attempting to override the current value in [Column Attributes] of the field in the [Elements Attibute] setting - [value="userX"] simply adds this as the second value argument of the input element (of the html source).
Suggestions?
Similiar scenario - I have a flag in this table set false that a user can set true when they feel they have satisfactorily reviewed the record.
Since it's in a tabular form it can be changed along w/ other records, but they may not feel the review is complete (so they effectively want the flag to remain false).
I'd like to be able to read records in but set/default the value to reviewed (as a convenience) but due to the problems noted above, this doesn't seem possible.
Similar Messages
-
How to set key fields in a Database view
Hi guru's
iam balaji,plz guide me with how to set key fields in a view.......that field is a non key field in the base table....
thanks in advance,
Balaji.Stake a look at this:
Diagnosis
In the view, not all of the mandatory fields were included as key
fields. The key of the view therefore is not unique.
System Response
All the fields are regarded as key fields in order to guarantee that th
key lengths are unique.
Procedure
For views with a large number of fields, this could have a negative
effect on the performance for the language construction described below
In this case, all the mandatory key fields should be included in the
view.
regards -
How to set Character field's Format Mask?
dear all,
how to set Character field's Format Mask?
i searched the forum and found the following, where can i use this code and how to change and set its format mask.
SRW.SET_FORMAT_MASK('mask');
Thanks
Muhammad NadeemNadeem,
If you have database 10g, look into function REGEXP_REPLACE. Otherwise you can also try this (you might already know).
SELECT SUBSTR('CHHOCMIPO07020001', 1,2)||'-'||SUBSTR('CHHOCMIPO07020001' ,3,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 5,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 7,3)||'-'||
SUBSTR('CHHOCMIPO07020001' , 10,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 12,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 14,4)
FROM dual
CH-HO-CM-IPO-07-02-0001
If you have to use this at many places, create a function, pass the raw value, manipulate the string and return.
FS -
How to set the field SKB1-FDLEV as requestred-entry in G/L Master data?
Hi All,
Could anyone tell me how to set the field SKB1-FDLEV as requestred-entry in G/L Master data?
Thanks
Gandalfhi
Go to OB26
select Your criteria ( create, change or display)
double click on it
again double click on Bank/financial details
there you will find the Planning level make it require entry
save
with regards
ramanuja chary -
How to set the field non-editable in the classical report..
Hi..
How to set the field non-editable in the classical report..Hi experts,
For the component 'ICCMP_EMP_SRCH' there is a view 'BUPAEMPSEARCH' , which has 2 context nodes 'CUSTOMER' AND 'SEARCHEMPLOYEE' , i need to add the field 'NICKNAME' which is part of the 'CUSTOMER' context node on the search screen. Currrently all the fields on the screen screen are from the 'SEARCHEMPLOYEE' context node. when i did the configuration , the 'NICKNAME' field is greyed out . I have already generated the Getter ,Setter , GET_I, GET_M methods for the 'NICKNAME' field and the context node and controller class and context class are all active .
on debugging the GET_I method, i see that rv_disabled = 'TRUE' and the current = collection_wrapper->get_current( ) is returning empty value .
for this rv_disabled to be set false , the code below is not triggered since there is no value in current.
IF current->is_property_readonly(
'NICKNAME' ) = abap_false. "#EC NOTEXT
rv_disabled = 'FALSE'.
ENDIF.
when i check for other search fields of context node 'SEARCHEMPLOYEE' , all the fields are set to rv_disabled = 'FALSE'.
can anyone suggest how to approch this. iam i missing any binding between context nodes or any activations ?
The field properties are set as Input field and the display checkbox is not checked. -
Tabular Forms - how to change the color of text when the field is disabled
Hi,
I have a tabular form and some of it's columns are disabled showing text in grey color...
is there a way to change the color to black and bold the text...?
thanksOkay, i've taken a look at your example.
The column formatting does not work on the input fields. The help on the item says that it generates a span with a style attribute. This would work for a display field, not for an input field.
Css like i've written should be in the style tags, put up in the header section of the page (page -> edit -> header region).
You've already put script tags there, the style tags go there aswell. You shouldn't even need to put your script tags in the header region. Just put your code up in the javascript functions region (without the script tags).
However, i tested in firefox and here color works on an input field, changing the font color. In IE it does not do this. Cross browser implementations and such, not much to do about it here. See http://stackoverflow.com/questions/602070/changing-font-colour-in-textboxes-in-ie-which-are-disabled.
I did notice that you build your form with a bunch of input fields, which you disable through javascript in the footer of the region. Then on submit, you set the disabled to false again for all those fields! If you want those fields to always be submitted to the server, why wouldn't you use the readonly attribute? Readonly fields are always submitted, and can't be edited by the user. Plus, readonly fields CAN be styled however you want! You can get rid of the javascript code in your header then.
Even the javascript in the footer is not necessary. If you just add 'readonly="true"' (without single quotes) to the element attributes of your items (edit column -> column attributes region) = no javascript at all (less maintenance). -
Dynamic Form in Tabular Form i.e SET VALUE
Hi,
I have an tabular form ,
In which two column are there i.e username and department
Just I wnt to know can dynamic action i.e SET VALUE CAN BE USED IN TABULAR FORM.
AS I CHANGE THE USERNAME THERE PERSPECTIVE DEPARTMENT SHOULD CHANGE.
can anyone help.Hello Trent,
I too, am attempting to set the value of an item when another item is changed.
I need to capture the APP_USER changing the row for each row changed in the tabular form when submitted.
My table is in a remote database that is not allowed to have APEX loaded directly in the instance (or db link TO the APEX instance).
Can’t get the APP_USER making the change at this level, as the APEX code is not there.
The instance that hosts the APEX installation accesses the table via a view through a db link.
Can’t use a trigger on the view to set the APP_USER using APEX functionality.
Not desirable to re-invent the IUD wheel using instead-of triggers.
The example you posted on http://apex.oracle.com/pls/apex/f?p=45448:11 is exactly what I need (even though your example sets the value on Lose Focus and I Set value on Change).
I am attempting to implement the dynamic action for the item using your javascript, and am almost there....but not quite. The dynamic action is updating the target item in ALL the rows in the tabular form, not just the one that is being changed.
This, I am sure, is due to my inexperience with Dynamic Actions, jquery syntax, and the javascript API’s for APEX. I believe I know what the issue IS, I’m just not sure how to work around it.
Please note: I attempted to download your example at the above website (turning off popup blockers), but had no success (I got the thank-you for downloading message, but have no clue what was downloaded to where). I was hoping to compare your form Dynamic action with mine to see where I went wrong.
If you could please, review the following and:
1) let me know what might be different from your working example?
2) provide info on how to get your working form downloaded (such a tease to have the download link there and not get it to work ;0} ) , please?
The following shows the html from view source for a row in my tabular form. This will help you get an idea of the items. The actual number of rows in the form is about 50.
<table cellpadding="0" border="0" cellspacing="0" summary="" class="report-standard">
<tr class="highlight-row">
<td headers="CHECK$01" class="data">
<label for="f01_0002" class="hideMe508">CHECK$01</label>
<input type="checkbox" name="f01" value="2" class="row-selector" id="f01_0002" />
</td>
<td headers="JOBNO_DISPLAY" class="data">X111Y2222</td>
<td align="center" headers="DEPR" class="data">
<label for="f03_0002" class="hideMe508">DEPR</label>
<input type="checkbox" name="f03_NOSUBMIT" value="1" id="f03_0002_01"
onClick="if (this.checked) {apex.jQuery('#f03_0002').val('1');}
else {apex.jQuery('#f03_0002').val('');}" />
<input type="hidden" name="f03" value="" id="f03_0002" /></span>
</td>
<td headers="UPDUSER" class="data">
<label for="f04_0002" class="hideMe508">UPDUSER</label>
<input type="text" name="f04" size="16" maxlength="2000"
value="MOMSDAT" id="f04_0002" />
</td>
<td headers="DERIVED$01" class="data">MOMSDAT</td>
<td headers="UPDDATE" class="data">13-DEC-11
<label for="f02_0002" class="hideMe508">JOBNO</label>
<input type="hidden" name="f02" value="X111Y2222" id="f02_0002" />
<input type="hidden" id="fcs_0002" name="fcs"
value="DB31F7B9ED99E6A2F7295F6B7D236409">
<input type="hidden" id="frowid_0002" name="frowid"
value="AAATI3AAGAAAAIXAAo" />
<input type="hidden" id="fcud_0002" name="fcud" value="U" />
</td>
</tr>.....
<tr>.....</tr>
</table>
To help explain:
I have a checkbox associated with array name f03_NOSUBMIT,
This checkbox OnClick updates a hidden item associated with array name f03. The hidden item is linked to the depr column of my view/table (this functionality is straight from Oracle’s tabular checkbox wizard – works great, no problems).
When the check box is changed, I need to capture the APP_USER value in the UPDUSER field associated with the f04 array (nice that the array names matched up with your example :0} )
To do so, I created a dynamic action:
Name: Set_Upduser
Sequence: 10 (it’s the only DA)
Event: Change
Select Type: jQuery Selector
jQuery Selector: input[name=”f03_NOSUBMIT”]
--note: the event does not fire if I use f03
--since that value is not actually
--changed until submit with this
--method.
Condition: - No condition –
True Actions:
Sequence: 10
Action: Set Value
Fire When Event Result is: True
Fire On page Load: Unchecked
Stop Execution On Error: Checked
Set Type: JavaScript Expression
JavaScript Expression:
var row = $x_UpTill(this.triggeringElement, 'TR');
var otherElement = $('input[name="f04"]',row)[0];
otherElement.value = '&APP_USER.';
Selection type: jQuery Selector
jQuery Selector: input[name="f04"]
This ALMOST works...
When I run the page and click on just one check box, the UPDUSER fields are updated with the APP_USER for ALL the records, not just the row for the checkbox I clicked. And, if I submit the changes, ALL the records in the table now have the APP_USER in the UPDUSER column. Not just the column where the check box was changed (Which would be expected since all the values are changed in the form – hey, the submit part works :0} ).
Your example at http://apex.oracle.com/pls/apex/f?p=45448:11 works, setting the value for the target field only for that row. If I can get mine to work the same way, I will be good to go (as in hog-heaven, doing the Snoopy Supper-Time dance).
I am thinking my issue is with the row identification in the
--- var otherElement = $('input[name="f04"]',row)[0];
I seem to not be picking up the row value in the row var.
Am I reading line correctly where 'input[name="f04"]' is pNd, and row is pValue? Read the description of the $x_UpTill API, not sure how this is working to identify pValue (Row?).
Additionally, I am not sure what the [0] is for at the end of the otherElement var definition. I don’t see that listed with the $ JavaScript API parameters (Google wasn't much help there either).
OR, am I missing something else?
Once again, if you could:
1) let me know what might be different from your working example? (What does yours have that mine doesn’t)
2) Provide any info on how to get your working form downloaded at http://apex.oracle.com/pls/apex/f?p=45448:11. Please, please?
As always, your assistance is greatly appreciated!
Edited by: amckinne on Dec 27, 2011 5:29 PM
Edited by: amckinne on Dec 27, 2011 5:33 PM -
Tabular Form - How to store in a column the User details (APP_USER)
Hi all,
I have let's say the following table:
USER_COMMENTS(
ID number primary key,
COMMENT_TEXT varchar2(50),
POSTED_BY_USER varchar2(50),
DATE_POSTED date,
UPDATED_BY_USER varchar2(50),
DATE_UPDATED date)
How do I, using a Tabular Form, get the USER details in the columns POSTED_BY_USER and UPDATED_BY_USER and the SYSDATE in DATE_UPDATED...
I've tried the following:
Created tabular form, all fields included. In Report Attributes > edit UPDATED_BY_USER > Display as Display as Text (saves state); Default Type: Item (application or page item); Default: APP_USER.
It's not working.
Thanks!
AndreiIt has to be a text field column type with source like the other updatable columns. You should hide that column and create a second of display as text if you want to show the content. Once this is done then you can use the default value and just type the item name there as you did:
P1_ITEM
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------ -
Tabular form - how to auto populate a column with the user name
Hi,
I have a tabular form with 3 columns - (customer name, notes, user). my users are allowed to enter customer details in the notes section... as soon as the user completes notes section and save the form, I want "USER" field to be auto populate with the user name so that I may track activity by the user...
Please advice how to accomplish it...
thanks in advanceHi,
After user saves the forms that means commit to the database, so you can simply write a trigger like:
CREATE OR REPLACE TRIGGER "AUDIT"
before insert or update on TABLE1
for each row
begin
:new.user_field := nvl(v('APP_USER'),user);
end;
Regards,
Aljaz
Edited by: Aljaz on 4.3.2012 22:03 -
Dynamic Action on tabular form: to auto set value for all changes rows
Hi All:
I am using APEX4.2.3 and I am not very familar with JQUERY or Javascript.
I am having a tabular form to support Update and Delete action. The tabular form has 4 columns:
Column A: ID (Number) : Read-only column
column B: Name (Varchar2) : Editable
Column C: Age (Number) : Editable
Column D: ChangeFlag (Varchar2) : Read-only column ==> however, I want this column been automatically upldated by my APEX application
Here is the requirement: First user update Column B, or C or both for # of rows; then user click "Save Change" button. For ALL updated rows, I need to automatically update Column D with below logic:
For a given row,
IF Column D IS NULL THEN
set value = 'M' -- M means modified
ELSE --- column D has a value already
IF last character of Column D is 'M', THEN
don't do anything;
ELSE
set value of D = existing value + 'M' (here + means concatenate
END IF;
END IF;
I thought this can be done by creating dynamic action on tabular form ... I have researched this on this forum and can't find a good match example ..
I know I can implement this using a DB trigger; however, I want to learn if this can be achived via Dynamic Action.
Thanks!
KevinHi Expert:
Anyone can offer any direction or help on this?
Thanks!
Kevin -
How to set the field size in rule file.
i have to map total 30 fields in a rule file while by default it allows only 20 fields. so how can we set the fields as per our need?
Hi Dharmendra Ojha,
Essbase rule file does not constrain you with only 20 fileds.
When you click on 'create a rule file', by default it ll show you 20 fileds .But , when you open a data file ( in your case , you data file has 30 columns i.e 30 fields) in the data prep editor , you ll see all 30 fileds .
So ,you have to do nothing to increase the filed count , rule file will automatically show all fields .
Revert back for further clarity
Sandeep Reddy Enti
HCC
http://analytiks.blogspot.com -
How to set default field values in customer master data.
hi,
I want to set default values in customer master data (account group wise).
but
I don't know how to set it .
please help me.
(I don't want to change field status in account group rather than I want to set default values for field. )
thank you.hi,
this is to inform you that,
in SAP there is no such a provision.
but
in LSMW there is an option of CONSTANT VALUES.
check in SHD0 - also
please check and confirm
balajis\a -
How to set User-field in Plan order
Hi
could you tell me please how to set a user-filed in plan order. when I run MRP planing, I can write some data in this filed.
thanks
henryHi,
Actually these user defind fields are used/assigned in the routing.
Initially u have to define your own user defind profile through OPEC transaction.
Assign this profile in the routing.
So when ur executing Mfg activities, suppose if ur using some high materials like silver...etc.
Then after executing the particular operation some amount of silver chips or silver scrap will generated .
To keep chip/scrap qty operation and date which user defind is used.
Once u have assigned this profile to routing, then it will be automatically copied in the planned order/production order.when ur confirming the order then u have to enter the all related data.
Regards
Vijay -
Tabular form with non base table field
I want to develop a tabular form with
1. A non-base table edit field to accept a value
2. Insert/update another table based on the input value
3. Also, computed field on each row based on other fields on the records (like post-query trigger in oracle forms at block level - for each row)
Thanks,
RachnaThanks for your reply.
Varad, I like the link you sent me. It has a lot of good information.
I created a process (under page processing) called "Update/Insert Process" that dosn't seem to be working.
Question, I created a manual tabular form with SQL Query and created a process (under page processing) called "Update/Insert Process", then I check for each record in the tabular form. If the old value <> new value then I update/insert in the new table.
Any step by step will be highly apprciated - to create process/validation etc.
Thanks,
Rachna -
Tabular form - how to insert the latest timestamp based on the action
I am using tabular form(updatable sql report) to insert/update multiple values into one table. I have two data elements that is hidden from the user, Created_dt and Update_Dt.
I need to insert Created_Dt with current system date value when new record is created and update Update_Dt when current record is updated. I need to implement similar logic for Created_By and Updated_By so I cannot use database trigger.
I am not able to figure how to do this. Can someone please help me with it?
Thanks!Sample trigger showing how to store date/time and user id of who changes a row:
CREATE OR REPLACE TRIGGER "gartner_USER_REPOSITORY_T1" BEFORE INSERT OR UPDATE ON "GARTNER_USER_REPOSITORY" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW begin
begin
if inserting then
if :NEW.USER_ID is null then
select gartner_User_Repository_SEQ.NEXTVAL into :NEW.USER_ID
from dual;
end if;
IF :NEW.CREATED_BY IS NULL THEN
:NEW.CREATED_ON := SYSDATE;
:NEW.CREATED_BY := nvl(v('APP_USER'),USER);
END IF;
end if;
if updating then
:NEW.Modified_ON := SYSDATE;
:NEW.Modified_BY := nvl(v('APP_USER'),USER);
end if;
end;
end;
ALTER TRIGGER "gartner_USER_REPOSITORY_T1" ENABLE
/Thank you,
Tony Miller
Webster, TX
You can get more with a kind word and a two-by-four than you can with just a kind word
If this question is answered, please mark the thread as closed and assign points where earned..
Maybe you are looking for
-
Hotmail Sign In no longer showing
In Firefox when I open MSN and click on hotmail the sign in page is blank. Please help.
-
Upgrading Power Mac G3 from OS 8.5
I have an old Power Mac G3 that I purchased in 1999 along with the Adobe Creative Suite that was available then. What do I need to do to upgrade, so that, I can use my AOL internet dial-up without errors that do not support certain websites that I wo
-
RMBP - external screen turns black for a few seconds every once in a while
My external screen (Dell U2711) connected via Thunderbolt to Displayport cable turns black every once in a while. The rMBP is in clamshell mode. When it starts it randomly blackens the screen for 2 seconds with an interval of 10 seconds to 5 minutes.
-
Cannot reject/delete sales order line item due to del.date in 2210
Hi all, not sure if anyone else had this issue already.... Situation : Sales order line item entered with delivery date in 2210. We would like to correct this order but can't.... every time SAP issues error : Error determining posting period (info
-
Hello all, Could someone teach me to save and ImageIcon class to an file. I've tried ImageIO.write, but that doesn't accept an ImageIcon class. Tried to use BufferedImage, but that doesn't accept ImageIcon either. ImageIcon icon = new ImageIcon(file.