Locking in forms

i have a doubt in that in my application, users can select some sequential numbers from a table, i am using the following statement to lock a record once the user has selected a record and not to allow the other user to see this particular record and to let him select the next sequential record. The statement i am using is as follows:
SELECT STATUS INTO V_TEMP FROM TABL_SERAIL_NO
WHERE ser_no = R_RCS.RC_SC_ID AND STATUS = 'AA' AND EXPIRY_DATE >= TRUNC(SYSDATE) FOR UPDATE OF STATUS NOWAIT;
In the above statement, the clause 'FOR UPDATE OF STATUS NOWAIT' is used to lock the record. Now, the problem is that when the user exits the front-end session without a commit, the locked record remains locked for sometime, i guess 5-10 mins. I think, my query is clear to u. Now, can u please help me in understanding as to exactly what is happening as it is very urgent.

Hi,
You might want to try the following ON-LOCK trigger:
declare
dummy char(1); -- select .. into variable
row_free boolean not null := false; -- if the record is free, exit the loop and lock it
row_locked exception; -- if the record is locked, ask the user what to do
pragma exception_init(row_locked, -54); -- catch "ORA-00054: RESOURCE BUSY AND .." error
no_tries number not null := 0; -- number of tries
begin
loop
begin
select '1' -- try to lock the current record
into dummy
from emp
where rowid = :emp.rowid
for update nowait;
row_free := true;
exit; -- if success, exit the loop
exception
when row_locked then -- handle error ORA-00054, increment no_tries
no_tries := no_tries + 1;
end;
-- change the alert message
set_alert_property('al_lock', alert_message_text,
'Record locked (attempt '| |no_tries| |'). Continue trying?');
exit when show_alert('al_lock') = alert_button2; -- if user clicks no, exit the loop
end loop;
if row_free then -- record is not locked, let's lock it
lock_record;
else -- we're out of the loop, but the record is not ours
message('Error: record was not reserved for update or delete');
raise form_trigger_failure;
end if;
end;Don't forget to create an alert named AL_LOCK, with two buttons ('Yes' and 'No').
Hope this helps,
Pedro.

Similar Messages

  • Locking "Clea Form" with signatures

    I've created a fillable form and have inserted 3 sections. At the end of section one an employee is required to add their signature. In that signature box property I have set it so that once the signature is applied all form fields selected become read only. The form is then passed onto the next employee to fill out section two and I don't want them to be able to edit the first section of the record. etc. The final signature in section three should lock all form fields.
    These signatures lock the fields from being able to be edited, however it's kind of pointless when anybody after signing the document can hit "Clear Form" and all the form fields are removed - hence leaving me with a document that contains no records, just signtaures.
    How can I prevent the use of "Clear Form" from being used?

    Hi,
    If you choose to host your site on Business catalyst, then you can add the file attachment uploader button to your form depending on your site plan. For signatures, there isn't really an option to add signatures. However, you can add a check box button to the form in BC and serve it as the "I accept to terms and conditions" or something like that. You can make it a mandatory field to enforce the submitter's consent.
    Hope this helps.
    Regards,
    Aish

  • How to lock a form (all fields read only) using a button (JavaScript)

    Hi guys,
    I have a form with several input fields, check boxes. Using a button in the form, I would like to lock it using a JavaScript. Locking means in my case that all input fields, checkboxes, etc. are read only (cannot be changed anymore).
    I already use the following approach:
    data.form.MyInputField.access = "readOnly";
    The problem is, that this approach is not comforable from maintenance perspective. I would like a more generic or more simple way.
    Generic:
    loop over all fields and set them to "read only"
    Simple:
    xfa.form.lock; // but this does not work
    Do you have any ideas how to solve this requirement in another way as I currently do?
    Thanks,
    Thomas

    Now I used the following script:
    // set the whole form as container
    var objContainer = data.Report;
    // call the method to set all fields to read only (recursion)
    disableAllFields(objContainer);
    function disableAllFields(objContainer) {
         for (var i=0; i < objContainer.nodes.length; i++) {          
              switch (objContainer.nodes.item(i).className) {
                   case "field" :
                   case "exclGroup" :
                        objContainer.nodes.item(i).access = "readOnly";
                        break;
                   case "subform" :
                        disableAllFields(objContainer.nodes.item(i));
                        break;
                   default:
    It works but is there another possibilitiy such like
    form.lock;
    Thanks,
    Thomas

  • Email PDF Form and Sign Entire Submission - Can this lock the form and show the signature?

    Thanks to those who explained how to create a button that allows me to email a form as a PDF rather than XML. It helped me a great deal.
    Now I want to cause our time sheet adjustment form to be emailed from the employee to their supervisor, and have the form-data be read-only, and the employee signature to be obvious to the recipient.
    I've tried checking the Sign Submission check box in the Submit tab of the Button Object window, (where the mailto: tag has been entered.
    I clicked the "Settings..." button on the Submit tab and then, under the "Sign Data and Submit Settings" dialog box I selected "Sign Entire Submission". But this does not lock the data and the resulting PDF form once emailed, shows no sign of a signature.
    I also tried adding a signature field, and clicked on it to add a signature. But once the signature was added, the Button was disabled and I could not submit the form via the mailto: tag.
    Is there a way to signa form with a self-signed signature, and email the entire PDF such that the recipient can see the signature, and that the data are no longer editable?
    Wouldn't that just be ducky...?
    Thanks again,
    -David Bartholomew

    Thanks for your comment. I suppose I need to add a context to my intended usage to explain why I want what I described. I want the signature to be apparent so users can see that a submission was signed. These forms that I am considering will replace a paper form used internally within my organization, to request a time card change. They only need to be signed as a pro-forma requirement.
    If the electronic forms solution is approved by management, I will make a case that since the network is a closed intranet, there is little consequential likelihood that a fellow employee would forge another's time card change request. And since the new form would be submitted through email, there is a further validation that the email will identify the sender's email address. This proposed electronic submission method is certainly as valid as forms where users cut and paste an image of their signature in a document...
    The good news is that since I asked this question, I discovered the samples that came with LCD 8...
    An example can be found in the Live Cycle Interactive Purchase Order sample found at [installdir]\EN\Samples\Purchase Order\Interactive.
    The interactive Purchase Order sample shows how a collection of fields can be defined and then the signature applied only to the data in the collection. The email button is defined as not included in the collection. This way the signature field can be used, and once the document is signed, the email button remains enabled.
    The interactive purchase order sample also demonstrates how a drop down list can be populated by a JavaScript as well as some array handling syntax that I've been looking for.
    I recommend the samples to anyone who, like me, may not have been aware of their relevance.
    Thanks again, this forum is a great resource.
    -David

  • How do I lock some form fields, but not all?

    How do I create a form with interactive form fields where certain fields can be locked after being filled in, and others remain unlocked so the customer can interact with it?
    My workflow looks like this:
    I created a PDF with open form fields for my client to distribute to their salesmen.
    Salesmen receive a call, fill in the information gathered. (name, address, services, price quotes, etc)
    Salesmen email the pdf form to the customer. All fields that they filled in now need to be non-editable, EXCEPT an "I agree" checkbox and a signature line.
    Help is greatly appreciated!
    Michael

    Hi Michael,
    Before I go too deep into a suggestion, I need to know if you are using electronic digital signatures for signing the document? Or, are you expecting the customer to print the document, sign it with a pen and fax it back? The reason I ask is you could use digital signatures to lock specific parts of the document, but if you're not using them I won't bore you with the details.
    Thanks,
    Steve

  • LOCK BOX-forms

    experts-
    Can u give the brief explnation about the Lock box information there what type of FORMS are used, who is the configured about this one. (for eg:- we are use the forms in APP f110_D_AVIS) AS the same what type of forms are used.(if it is asking the correctly, pls pardon me)if u know the what u have give the brief expl...

    hi
    if i understood your requirements so u can try something like this.
    SET_ITEM_INSTANCE_PROPERTY('ITEM_NAME',:SYSTEM.TRIGGER_RECORD-1,UPDATE_ALLOWED,PROPERTY_FALSE);
    SET_ITEM_INSTANCE_PROPERTY('ITEM_NAME',:SYSTEM.TRIGGER_RECORD-1,UPDATE_ALLOWED,PROPERTY_TRUE);for more informations plz search for.
    SET_ITEM_INSTANCE_PROPERTY built-insarah

  • Element Locked by Forms (hr_entry_api)

    Hi,
    I am using the API hr_entry_api.delete_element_entry
    in concurrent program.
    Program is keep on running its not completing since the
    particular element entry is locked by the Front End forms.
    So how to handle such situation???
    Pls advice me.Its urgent request.
    Thanks,
    narayanan.

    Its not a processed element.
    The scenario is if the client runt the E-Entry interface with wrong file then it should be deleted.
    So if any of the Entry being updated,my program should skip thhat Records
    and process the next record with appropriate error message .

  • Transaction Lock in Forms (TM,TX) How to get around?

    Hi,
    what is industry practice to avoid blocking locks bringing application processing to a standstill.
    I have few core table in material module e.g. material master, request, receipt, issues, whenever multiple user start using their respective forms such ac material_request, material_receipt, material_issue, Transaction Locks are acquired. and unless and until blocking user commits his transaction nobody else is able to work. how to get around this problem.
    There is lot of tech.material on net which tells me how to find blocking lock and objects, but nobody is giving answer how to avoid this situation.
    what is industry practice to avoid blocking locks bringing application processing to a standstill.
    regards

    Risky Solution !!
    I am facing more problem in to material requisition form, because many user want to request material. they open this form start entry and when they stuck for information they just keep that form open, in background the tables are locked because of change in data-block. now what do i do.
    regards

  • Linking Student Assessment Form (Rubric) to ePortfolio and Locking the Form when Completed

    Hello, I am attempting to move closer towards the paperless classroom using the Adobe Suite. I have created a student assessment rubric using a form that automatically calculates self assessment and teacher assessment scores and gives me updated responses etc. The next step is for the students to save this to their ePortfolio, however, I would like to be able to lock down the form before this step (eg after I have completed my assessment) so students cannot change either their own or my scores and comments. Apart from saving the doc as a jpeg, i can't quite work this out.*

    You can either flatten the pages of the document or lock the document by applying a digital signature and choosing to disallow changes. The other option of simply setting the fields to read-only is not secure and can be defeated relatively easily, so it wouldn't be the best option for this.
    For a handy JavaScript-based utility for flattening pages, see: http://www.uvsar.com/projects/acrobat/flattener/
    For more information on creating a certified document, see Acrobat's help doc.

  • Activation lock on former employees iPad

    I work for a small company and we have a sales force of 8. We bought iPad 2's from AT&T for the salesmen. One of the salesmen was let go a month ago and he turned in his iPad. Which sat in storage until this week when I took it to get it ready for a new employee. When I turned it on I saw the iSO 7 update was waiting so I updated the iPad and wiped it. Now it's asking for the former employee's Apple ID and password.
    We've made nurmurous attempts to contact the former employee without sucess. When another employee was able to reach him, he claimed he forgot the password and did not have access to it. We are quite sure he is just being vindictive for being let go.
    So the issue is, we have a company owned iPad, bought throught AT&T, through our business rep which we still have the receipt for that is now useless. AT&T says it's an Apple issue and everything I've read seems to indicate that Apple will do nothing to help. The kicker is that the employee used their company email address for their Apple ID, yet must have changed their emergency email to their perosnal email because we have access to their email box and do not get the reset email when we use the iforgot website.
    Is there any remedy?

    cbdsouth wrote:
    I have a similar problem with two iPads used by teachers.   There has to be a way to fix this issue!
    You tagged onto an older post. If you want an answer to your specific question, you need to create a new post. By creating a new post, you will receive emails when helpers post responses.
    That said ...
    Talk to Apple Support. A Senior Advisor could unlock the device as long as you are able to provide the device serial number and proof of purchase.
    The direct number for Apple’s Support is (800) 694-7466
    Streamlined email process for removing activation lock
    AppleCare has announced a new process to assist institutions with returned devices which may be activated locked.  For customers who experience this for the first time please call AppleCare at 800-800-2775 so that the process and needed documentation can be explained.  After the initial call customers can email with the required documentation for all Activation Lock Removal requests.
     Cheers, Tom

  • Can I lock a form to prevent printing/saving while also distributing so it collects responses?

    I am currently using Adobe Pro X and have created a number of fillable forms which have been distributed to staff and clients. Can you add security to a form so that end users aren't able to print or save but are still able to return the form for data colleciton purposes? I attempted to modify security settings so that this functionality was locked, but then received a message saying I could not distribute the form due to security settings. 
    Thank you!

    Acrobat (10 and above) won't allow you to use the Distribute Form process if you've added security, but you can separately Reader-enable a secured document and distribute it yourself. It's not clear what you mean by prevent saving since the form would have to be saved after it's filled in order to send it back to you.

  • LOCK the form once its SAVEd?

    Hello
    I have developed a form, opening in browser, as online, well.
    But, if user once SAVEs that form on local machine, all the field LOCKED or GREYED OUT, it shuld meant for just DISPLAY purpose
    Pls. let me know hoe can i get this requirement, JS code snippet pls?
    Thank you

    Thank you.
    My impression:
    PreSave: Fires as soon as user clicks the SAVE button, but not YET the form saved on PC
    PostSave: Fires, AFTER form is saved on PC
    Not sure, did i understood correctly or not
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000753.html
    I will explain my requirement:
    My form uses by 2 kind of user groups, say, grp_1 and grp_2 (i knew/ my_form knows that which group is logged-in/accessing/opened the form, so that i can differentiate the below 2 scenarios easily, no worries here for this validation )
    grp_1: With your first code snippet working well, i am all set here, Thank you
    grp_2: User opens the form, starts entering data, user is half way, want to take coffee braek, hence want to SAVE at that point as is on PC, so user clicked SAVE button of the form (work-in-progress) and the form has saved on PC...........if user opens this saved form, it must be locked status/not editable status
    Well,
    User came back from coffee, want to continue filling the rest of the stuff/fields/pages of the form, so, let user go ahead filling the form......may be if user want to save any time (even completing all the fields/sections/pages) the form on PC, let SAVE, but again the the SAVEd form should ALWAYS in lock/non-editable state
    Pls. help, where should i write the JS for this grp_2 case, JS Code snippet pls?
    I guess, i need to write some piece in PreSave (as i am doing for grp_1) and fields "open" peice is in docClose or Validate event as below link tells, not sure
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000753.html
    Than you

  • Locking the Form to be signed only by certain Signature Certificates

    Hello,
    I have a form that I would like to restrict singing it to certain certificates.
    I tried to check the box under Signature Settings/Signing certificates/Specify the Signing Certificates.
    every time i hit OK and come back to the setting  I see the check box unchecked
    and then i was able to sign the document with different certificate
    could you elaborate me how to solve the issue
    Thanks

    Hi allstarfire,
    Unfortunately, signature field option is not available in Adobe FormsCentral.

  • Form to be signed only by certain Signature Certificates and Automatically lock the form after singing

    Hello,
    I have a form that I would like to restrict singing it to certain certificates.
    I tried to check the box under Signature Settings/Signing certificates/Specify the Signing Certificates.
    every time I check the box and then OK I come back to the setting and  I see the check box unchecked
    and then I was able to sign the document with different certificate after the distribution.
    could you elaborate me how to solve the issue
    Thanks

    The auto field wizard does not catch all fields or types of fields (signature is one of them), does not keep exclusionary groups, and does not add the optional values. The wizard can have a hard time recognizing check boxes and radio buttons.
    So even after you run the wizard there is a lot of manual clean up to perform. I just find it easier to create the form fields as needed. I also use a lot of field naming for automation processing of groups of fields.
    Open Office does not do signature, but it keeps the options for combo/drop downs and radio buttons/check boxes.

  • Rich text fields, field locking, and form saving/re-opening

    I have a LiveCycle form that has 2 text fields (email and info) and a button. When the button is pressed, the 2 text fields are set readonly and the button is set hidden. A rich text field is populated to provide a mailto link using the email and info text fields:
    form1.firstpage.HyperlinkSF.rtField.value.exData.loadXML(sRichText, false, true);
    This appears to work fine, but when I save the form and re-open it, the readonly fields are now editable and the button has re-appeared. If I remove the functionality associated with the rich text hyperlink, the form correctly re-opens with the readonly fields set readonly and the button is not visible.
    Any idea why populating a rich text field is affecting the form state on saving/re-opening?

    Thank you Bruce for your very helpful links.
    I see that I had incorrectly formed the rich text body tag. I had omitted:
    xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    I had also been unable to get the &body= of the mailto working, and see that I should have had &amp; as in:
    var sURL = "mailto:" + sTo + "?subject=" + sSubject + "\&amp;body=" + sBody;
    All appears to work as expected. Great links. Thanks!
    Robin

Maybe you are looking for