All,I have a Text/Computed field that I want to set to Yes when the RemainingApprovers field in empty. (This is done elsewhere and is working properly)
I have the following code in this field now, and it kinda works:
@If(@IsNewDoc; “No”; @If(RemainingApprovers = “”; “Yes”; “No”))
However, my issue is this, on a new document creation, when you submit the document for approval, I have a JS button to do the submit,
var doc = document.forms[0];
doc.AgentRunner.value = “”;
validateFields();
doc.submit();
then it fires of the WebQuesrySave agent which updates a few fields, returns the display to a different form, which therein it is no longer a new document, and is setting the field to YES automatically. It should remain No when it is submitted.
At this point in the process (new document creation), there is no subform on the document that contains the RemainingApprovers field. It becomes available once it is submitted (i.e. after this process). I do not think this is the issue, but wanted to include this as well.
In fact I would prefer if the code did not even look for the RemainingApprovers field until after it is submitted if possible.
I would appreciate a review of that formula to see if there is a better way to write this.
Thanks
David