Preventing Duplicate fields in forms
Hi,
We have a requirement of preventing the user entering duplicate fields.
For example
The user enters vendor number XXXX in the first record
and when he comes to second record or any subsequent record he should be prevented from entering XXXX.
Thanks
Hi there,
If the user is entering a 'new' record for a vendor and if the vendor number has to be unique, you should consider making the field a primary key and have the system generate the number (through a Sequence) rather than user-entered. This would avoid the 'problem' that is in question.
Regards,
John
Similar Messages
-
Hi All,
I have list with some Lookup columns like City, Pin, and Text Column Name. All these are required columns.
Now I want to prevent duplicates while submitting InfoPath form if a Combination of City,Pin & Name. (like a Composite primary in Database is used.)
Can some one help me on how to achieve this using InfoPath 2010 Rules, writing rule in Xpath.
Thanks in Advance.1. Add a secondary data connection to the list where the form will be submitted.
2. Prior to submit via rules, set the query fields in the above connection: City, Pin & Name with values entered in the form. Query the data source and check if the result has values.
3. Show error messages accordingly if exists else continue with Submit.
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom. -
Prevent duplicate outputs within a table?
Hi at all,
we have a table in a subform. At the moment there are several lines with the same material. This is ok.
Is it possible to prevent duplicate output in the form? We want to print out the rest of this line but set the material to blank.
I tried this with scripting with java script:
If (data.TF.DATA.field.rawValue == data.TF.DATA[-1].field.rawValue)
data.TF.DATA.field.rawValue = "";
Is it possible to point on the previous line with
DATA[-1]
This works for the conditional break so I hope this will works too.
I don`t want to use group levels...
Thanks.
TimoThanks for your answer.
It works.
data.formular.DATA.field::ready:layout - (FormCalc, client)
If ($.rawValue == data.form.DATA[-1].field.rawValue) then
this.presence = "hidden";
endif -
How to prevent deletion in a form ?
I need to prevent deletion in a form if the starting date <= SYSDATE and show an alert .
How do I implement this please ?
My date field is of type timestamp , it's "id2"
I have added the following method in my backing bean :
public String preventDel() {
long toDateAsTimestamp = id2.getTime();
long currentTimestamp = System.currentTimeMillis();
long getRidOfTime = 1000 * 60 * 60 * 24;
long toDateAsTimestampWithoutTime = toDateAsTimestamp / getRidOfTime;
long currentTimestampWithoutTime = currentTimestamp / getRidOfTime;
if (id2 < currentTimestampWithoutTime )
System.out.println("Display report.");
//how to show the alert ?
return null;
Any help please ?Hi girl.
If i were you this is how I would do it;
1.- Create a transient attribute in your VO called ToBeDeleted of type boolean and assign its value as the following expression "StartingDate <= adf.currentDate".
2.- Expose the attribute in your bindings. Then, in your delete button you can:
- Disable it if ToBeDeleted is not true.
- In the description of the button you could put a message that it cant be deleted.
OR
Use your java class to show the message. But the alert should be thrown as a facesMessage of type Error: look at this How to show af:message programatically
Also, I would like to say that none of this might be the best way to implement your use case. For the sound of it you have a business rule that should be implemented in your model project if you don't want to break the MVC pattern. (This is that you shouldnt be able to delete the row using your AppModule tester if the startingDate <= Sysdate, for example).
Hope this helps. -
Hi There,
In SAP GRC 10.0, our team had an issue where we could not add duplicate fields from separate table (see ERROR: Select Currency/UoM field for the selected analyzed fields). This was resolved by the SAP Note 1904313/ 1904314 (http://service.sap.com/sap/support/notes/1904313).
We upgraded our system to SAP GRC 10.1 SP05 and could now add the duplicate fields from separate tables. SAP Note 1904313/ 1904314 was part of SAP GRC 10.1 SP03 so it makes sense that we, in a higher version (SP05), would be able to do this.
The issue now is when we add the duplicate fields from different tables and run the Ad-hoc Query to test if the data source works correctly, the No Data Selected warning persists. This means that the data source provides no data for analysis, which is required to write our business rules.
Below is an example:
Basic data source with just one currency reference field EBAN-WAERS.
When you run the Ad-Hoc Query you receive data.
Basic data source with second currency reference field EKKO-WAERS.
When you run the Ad-Hoc Query no data is found.
Please also make reference to the following thread logged by my colleague (ERROR: Select Currency/UoM field for the selected analyzed fields)
Any assistance to receive data with duplicate fields from separate tables will be highly appreciated.
Thanking you in advance.
Regards
Gary KhanHi
following are the error messages from dump
hrtText
There is already a line with the same key.
hat happened?
Error in ABAP application program.
The current ABAP program "SAPLCKMS" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
rror analysis
You wanted to add an entry to table "\FUNCTION-POOL=CKMS\DATA=T_DYN_CKMLCR",
which you declared
with a UNIQUE KEY. However, there was already an entry with the
same key.
This may have been in an INSERT or MOVE statement, or within a
SELECT ... INTO statement.
In particular, you cannot insert more than one initial line into a
table with a unique key using the INSERT INITIAL LINE... statement.
rigger Location of Runtime Error
Program SAPLCKMS
Include LCKMSF01
Row 226
Module type (FORM)
Module Name DYNAMIC_PERIOD_CLOSING
Source code where dump ocured
222
223 APPEND ht_ckmlpp TO t_add_ckmlpp.
224 APPEND LINES OF ht_ckmlcr TO t_add_ckmlcr.
225 INSERT ht_ckmlpp INTO TABLE t_dyn_ckmlpp.
>>>> INSERT LINES OF ht_ckmlcr INTO TABLE t_dyn_ckmlcr.
227 ENDWHILE.
Also I guess there is problem with material ledger in R/3 side
I have never worked on material ledger before so dont hav idea of Tcode and tables in SAP R/3 for material ledger.
Thanks
Navneet -
How to trap duplicate fields?
hi,i am using oracle forms developer 6.0.i want a standard stored procedure to trap duplicate fields.i need to track data types number,char and date.i was not using primary keys and foreign keys.please help me anyone.must be a standard one.thanks in advance.
05ce8847-63f6-462d-9c5b-c21076276bb4 wrote:
hi,i am using oracle forms developer 6.0.i want a standard stored procedure to trap duplicate fields...
By this, I assume you mean you want to check for duplicate values in a block. There are several ways to do this and there are several examples of this in the Forum and on the Internet. Many of the examples on the Internet are demonstrated in Forms versions greater than Forms 6.0, but they should still work in Forms. You just won't be able to open the sample/demo forms included with the examples.
i need to track data types number,char and date.i was not using primary keys and foreign keys.
Why would you not want to enforce uniqueness on your table? As I mentioned above, there are methods in Forms to check for uniqueness (duplicates) in Forms, this should always compliment what you enforce through your table - not replace what you enforce on your table.
Craig... -
Does anyone have a suggestion regarding how to prevent duplicate posts with JSF?
As an example, I have one form that allows users to carry out CRUD operations on the data that is being displayed. All successfully processed requests result in a post back to this same page.
I really want to avoid the problems that could occur if a delete or new request gets reposted by an impatient user.
Any suggestions are welcome. I should also note that for scalability reasons, I prefer to avoid solutions which require storing token, etc. in the session. I will settle for such a strategy in the absence of a better solution.Thanks to all who responded. Just a couple follow-up questions and comments.
1. Can not use Shale. I'm in a heavily restricted corporate environment that limits me to IBM's (poor) implementation of JSF 1.0.
2. Would rather not address the problem soley through the use of JavaScript because users can always disable JavaScript.
3. Redirecting back to the page instead of forwarding back is not practical for three reasons. One, it will require my backing bean to make calls down into my application to retrieve data that would already have been readily available if I were forwarding, and I'm not comfortable with that performance decrease. Two, redirecting back to the form makes displaying of validation errors difficult. Three, redirecting to the page would successfully handle the circumstance where a user hits refresh, but doesn't handle the case of an impatient user who clicks the submit button twice while waiting for a response.
If anyone can propose a solution that works within these constraints, let me know.
Thanks again for those who are contributing. -
How to prevent duplicates in your contacts
When syncing two iphones via icloud with your computer how do I prevent duplicate contacts between both phones, icloud and yahoo?
I have 11 people designated under faces.
Do you see the 11 People when using the "Faces" view from the source list in the Library Inspector or from the "Faces" button in the toolbar?
If you are using the Faces button from the toolbar, you may have been excluding faces stacks you already created. Then, when you enter search strings, Aperture will suggest names from your contacts and you may create the same stack again.
Also, if the search field is not empty, you may already have more "Faces" stacks than you are actually seeing.
As you certainly know, you can always unite "Faces" stacks by dragging a stack onto the other to merge them. The merged stack will use the name of the stack you dragged to.
Regards
Léonie -
How to prevent duplicate submission?
Hello!
I have a page for gathering some data:
private function saveHander():void {
// Gathering data into database.
<mx:TextInput id="name" />
<mx:TextInput id="age" />
<s:Button id="Submit" label="Submit" click="saveHandler();" />
When focus on submit button,I click at the button and press the space bar at the same time,saveHander function execute two times.
How can I prevent duplicate submission? thanks!Assuming this is a form you are attempting to save, good UX practice is to disable the form once you begin local form validation (submit button clicked) prior to forming your data packet for save.
Doing so will prevent the anomaly you are experiencing.
In other cases where the above practice is not practical, you can setFocus to another component (off the submit button) because as long as the focus remains on the button, depressing the space bar will trigger the mouse event for the button. Research ADA compliance if you want more details.
HTH. -
How to prevent duplicate entry in Details block
Dear All
I am using Forms 10g.
I have a detail block.
There is a column called Ip_Address.
There i want to prevent duplicate entry .
How can i do this ?hey i have a requirement that to restrict duplicate entry in both block(both multi record).the blocks are DEPT(MATER)
EMP(DETAIL)
the associated fieds in master block DEPT.DEPT_NO,in detail EMP.EMP_ID .
I have done' Kevin D Clarke’s calculated item ' both in master and detail block
its working fine for master block but in case of detail block its only respond to the current session(i.e. if the new value is inserted or save it will restrict another record to be inserted of that last record's value),it does not restrict duplicate value enter ,checking with other existing records(which are saved in earlier session,though after query it is shown on the form)
can anyone guide me why its not working -
Prevent duplicate on put() using DPL
Given it is not possible to have composite index keys, what is the best way of preventing duplicate record creation on a put() using DPL. For example, for the following:
@Entity
public class Category {
@PrimaryKey
private Long recordID;
private String description;
private Integer type;
private Long customerID;
So how to avoid a duplicate put() on ( description + type + customerID ) ...... without a performance compromise.
Can I extend the class with Comparator and then use set DatabaseConfig.setDuplicateComparator(Class<? extends Comparator<byte[]>> duplicateComparatorClass) or am I completely on the wrong track?
Thanks, LenDoes your GenericLookup constructor fill in the fields of the secondary key (the fields of the GenericLookupConstraint class)? You didn't include the constructor in your post.
In your source code you've duplicated the fields, which makes me wonder whether you think that the key fields are not part of the entity. The secondary key is part of the entity, so there is no reason for the duplication.
If you're still having trouble, please create a complete test program with a main() so we can try it and see what you're doing wrong.
--mark -
I would like to make sure there are no duplicate data entries in my JSP that populates an Oracle database with a table called MainTable. MainTable has an Id field that is the primary key, ValData with a varchar data type, Fid and Fid2 are number data types. Fid and Fid2 are foreign key values that are taken from another table.
Id ValData Fid Fid2
1 abc 34 2
2 efg 23 34
3 zeo 25 43Sometimes someone can enter duplicate data and the ValData, Fid and Fid2 will end up like this:
Id ValData Fid Fid2
1 abc 34 2
2 efg 23 34
3 zeo 25 43
4 zeo 25 43Is there anything in Java I can implement to prevent duplicate data entry in the above example?Thanks,
It now works after I added unique constraints to each of the fields.
Google results showed me that ORA-00001 is Oracle's Duplicate message and I added a condition in the SQLException Catch area and it catches all my Duplicate entry attempts and shows message to the user.
Here is what I have and would like to know if this is an efficient way I am doing this??
try
// db stuff
catch (SQLException sqle)
String message = sqle.getMessage();
if (message.indexOf("ORA-00001") != -1)
out.println("Duplicate Data entry.");
else
out.println("some other ORA error");
} -
Hi there,
I wonder if there is any approach to prevent duplicate login to Weblogic
server using the same userID and password.(weblogic provided or programmatic
is OK). I tried to use a table to maintain the current active user
information, but when the user just quits the browser or the weblogic server
is shut down, this will not work because the flag still remain in the table.
Does anyone have try it before or know how to do it?
Thanks in advanced.
KenThanks for your reply.
Actually, I am now using the similar solution except that I place a static
field(a hashtable) in the class that implements the
HttpSessionBindingListener to record the current users rather than store the
information in database table. Thus when the application server shuts down,
I don't need to clear the dirty data in the table.
Ken
Andy <[email protected]> wrote in message
news:[email protected]...
>
i'm doing the same thing with an application. i've extended theAuthFilter class
and whenever a user logs into the application i insert a row into a"current users"
table. i also set an object into the user's session that implements theHttpSessionBindingListener.
when the session expires (either by the user by logging out or times outwithin
weblogic) the server calls my class that was inserted into the user'ssession
at which time i remove the row from the "current users" table.
hope this helps -
"Neil Smithline" <[email protected]> wrote:
I believe that due to the loose coupling of a web browser and the server
as
defined in the HTTP spec, there is no way to ensure that both sides have
an
identical concept of "logged in". Any solution you propose will have
errors
as you described below. The server just plain can't tell the difference
between a slow-to-respond user, a user who's browser has crashed, a user
who
is having network problems, etc... This is not a WLS specific problem,
it
is HTTP.
Neil Smithline
WLS Security Architect
BEA Systems
"Ken Hu" <[email protected]> wrote in message
news:[email protected]...
Hi there,
I wonder if there is any approach to prevent duplicate login to
Weblogic
server using the same userID and password.(weblogic provided orprogrammatic
is OK). I tried to use a table to maintain the current active user
information, but when the user just quits the browser or the weblogicserver
is shut down, this will not work because the flag still remain in thetable.
Does anyone have try it before or know how to do it?
Thanks in advanced.
Ken -
I have a form that consists of columns and rows of fillable fields. When I use the edit function to make the height of the fields the same, or make the widths of the different columns of fields the same, or align the fields vertically or horizontally, duplicate fields are created. If these fields have a box around them, all of the duplicate fields' boxes are shown. The field names have the same base name, but have a suffix that is sequentially numbered. If I delete the "lower" numbered suffix names (with the same base name), the resulting field does not appear on the form.
What is going on with the alignment or size process. I do use the CTRL-Click function to select the group of fields I am trying to size or align. If using the selection of multiple fields should be done differently, how can it be done?No. That's not what's happening. The duplicate fields are ONLY created after I employ the alignment or sizing functions. Weird.
I was hoping that this was the result of some kind of setting in Acrobat, or that the duplicate fields would disappear when saving the form, but that's not what happened.
Thanks for your input, however. -
I am getting PLS-00410 error - duplicate fields in RECORD, TABLE or argumen
Here is what I am doing. I have a package header and a package body. The package header compiles successfully and the above error is displayed while compiling the package body only.
Package Header :
create or replace package pkg_pms_print is
type c_ref_printer_list is REF CURSOR;
PROCEDURE sp_get_printerlist
p_team_id IN NUMBER,
printer_list_refcur OUT pkg_pms_print.c_ref_printer_list
end pkg_pms_print;
Package Body:
create or replace package body pkg_pms_print is
PROCEDURE sp_get_printerlist (
p_team_id IN NUMBER,
printer_list_refcur OUT pkg_pms_print.c_ref_printer_list
IS
printer_list_refcur pkg_pms_print.c_ref_printer_list;
v_printer_id pms_test_team_printer.printer_id%TYPE;
v_printer_name pms_test_team_printer.printer_name%TYPE;
v_default_printer pms_test_team_printer.default_printer%TYPE;
BEGIN
OPEN printer_list_refcur FOR SELECT printer_id, printer_name,default_printer FROM pms_test_team_printer WHERE team_id = p_team_id;
--DBMS_OUTPUT.PUT_LINE('EMPNO ENAME');
DBMS_OUTPUT.PUT_LINE('--- -------');
LOOP
FETCH printer_list_refcur INTO v_printer_id, v_printer_name,v_default_printer;
EXIT WHEN printer_list_refcur%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(v_printer_id || '|'|| v_printer_name ||'|'|| v_default_printer);
END LOOP;
CLOSE printer_list_refcur;
END sp_get_printerlist;
END pkg_pms_print;
Apart from this error one error also shown as " PL/SQL: Item Ignored"
The compile points to the 3rd line in the package body for errors with the above mentioned error. There is no duplicate field name or argument name as the oracle error message says. It's a simple straight forward code. Can somebody help me if I am overlooking something?
Regards,
AgrawalVthis problem is solved but i am not getting output when i have tested this procedure in test window.
Program Continues upto 2nd DBMS call, means i am getting output upto 2nd DBMS call.
create or replace package body pkg_pms_print is
PROCEDURE sp_get_printerlist (
p_team_id IN NUMBER,
printer_list_refcur OUT pkg_pms_print.c_ref_printer_list
IS
-- printer_list_refcur pkg_pms_print.c_ref_printer_list;
v_printer_id pms_test_team_printer.printer_id%TYPE;
v_printer_name pms_test_team_printer.printer_name%TYPE;
v_default_printer pms_test_team_printer.default_printer%TYPE;
BEGIN
OPEN printer_list_refcur FOR SELECT printer_id, printer_name,default_printer FROM pms_test_team_printer WHERE team_id = p_team_id;
DBMS_OUTPUT.PUT_LINE('Printer ID Printer Name Default Printer');
DBMS_OUTPUT.PUT_LINE('----- ------- ------- ');
LOOP
FETCH printer_list_refcur INTO v_printer_id, v_printer_name,v_default_printer;
EXIT WHEN printer_list_refcur%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(v_printer_id || v_printer_name || v_default_printer);
END LOOP;
CLOSE printer_list_refcur;
END sp_get_printerlist;
END pkg_pms_print;
Maybe you are looking for
-
Problem with iMac and Wireless keyboard
The hard drive was faulty on my iMac. It took it into the AppleCare centre and they replaced the hard drive. When I got the imac back none of the function keys work on my keyboard. For example when I press F11 and F12 keys they no longer adjust my vo
-
Hi Gurus, I've been trying to run the Dunning program(F150) for a test vendor. 1. Created Credit Memo(FB65) 2. Dunning Run(F150) Now here, after entering the parameters i tried the "Individual Dunning Notice" button. There,, i selected the "Print Pre
-
We use varray in JDBC connection. ArrayDescriptor anArrayDescriptor = new ArrayDescriptor("N_FIELDS", conn); But we found exception: java.lang.ClassCastException at oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnection.ja
-
Recover CD key for Exchange 2010
Hi, I have to move our Exchange 2010 installation to another physical server as the current one is quiet unstable. But I can't find our Product Key / CD Key. Is there any way to retrieve it? Best Regards, Thomas
-
I've just published my first podcast episode on iTunes. I tagged the episode as explicit 'yes' as it contained swearing, but at podcast level (channel level I think) I tagged it as 'no' as it's quite possible there may be no swearing in future episod