Subject: Controlled-Access Section or Form Formula
You could use controlled-access sections and include the fields you don’t want the user to edit in those sections. Calculate the section access based upon the value of the Status field.
You could create two forms, one with all fields editable and one with only one field editable. Use a form formula to select the form depending upon the value of Status.
Subject: How allow user to only edit one field in QueryModeChange event?
Well, you could have all the other fields hidden if Status is “Paid” leaving only the one field editable and visible; you can provide computed for display fields to compute to the values of the other hidden, editable fields to still show them to the users. The computed for display fields would have to be hidden when the status isn’t paid, and the others would be visible.
Another option if there are too many fields is to provide some sort of dialog/prompt to allow them to changed the value…
Subject: RE: How allow user to only edit one field in QueryModeChange event?
Thanks,Dylan:Compare all options, I would think the dialog/prompt is better for my project now.
But the problem is, when the status field is Paid on the current uidoc, I put the codes on the QueryModeChange event to stop user to edit the current uidoc, if the current uidoc is not in edit mode, I can not use Inputbox(or prompt,dialog) to change one field on the current uidoc.
Subject: RE: How allow user to only edit one field in QueryModeChange event?
Depending on how you want it to flow, you could do something like code a button in lotusscript, which provides a dialog to get the value from the user, then get the back end document and write the value there and then close down the front end uidoc.
Subject: RE: How allow user to only edit one field in QueryModeChange event?
Thanks a lot, Dylan:I found the way to do it, although it is not the perfect, but it works, if you have better solutions, could you please let me know? Thanks.
This is what I did:
I have document which have many response documents which embedded on this parent document. one field of the document on the embedded view need be changed for some condition, but if the status is Paid on that document, I put the codes on the QueryModeChange event of the reponse form which do not allow user to edit. so for this case, even I open the document from the embedded view, I can not edit any fields on that reponse document.
What I did is I add a button on the action bar of the parent document, using picklist to pick all of the documents from the embedded view, select one the document,combine with the inputbox to accept user input data for that field and save the document at the backend.
Do you think this is the best way?
Thanks.
The field I want to modify is existing on the document on embedded view
Subject: RE: How allow user to only edit one field in QueryModeChange event?
A little different set up than what I had in mind but it sounds like it is working for you - Are allowed to select multiple response documents to edit the field on (if the values are to be the same)? You might want to provide them a way to edit the field from the response document as well, I guess using a button again if that is how you want to go.
Is it the best way? Not sure, depends on how quickly you want to implement something, how your users use it etc… maybe not particularly elegant but it looks like it is solving your problem.