Removing values from field based on other field values

Hello All,

I have this field called RemainingApprovers, that contains a list of all the people who are listed as approvers that have not yet taken any action on the document (going to use this field to send an email out after so many days to those approvers who have not done their part on the document.)

Below is the code I have in the RemainingApprovers field (Text, Computed, Multi-Value). This field is in a hidden section at the top of the form.

If a user approves the document, there will be a value in the ApprovalFlag_X field, so if this is populated, the user’s name should not be put in the RemainingApprovers field.

a1 := @If(ApprovalFlag_1 != “”; “”; ApproverName_1a);

a2 := @If(ApprovalFlag_2 != “”; “”; ApproverName_2a);

a3 := @If(ApprovalFlag_3 != “”; “”; ApproverName_3a);

a4 := @If(ApprovalFlag_4 != “”; “”; ApproverName_4a);

a5 := @If(ApprovalFlag_5 != “”; “”; ApproverName_5a);

a6 := @If(ApprovalFlag_6 != “”; “”; ApproverName_6a);

@Trim(@Unique(a1 : a2 : a3 : a4 : a5 : a6))

However, I have done the approval, for my name, but my names remains in the RemainingApprovers field.

Thanks for any advice you could provide.

David

Subject: Removing values from field based on other field values

Put the field towards the bottom of the form (at least below ApprovalFlag_X fields) and the code should work.

Subject: RE: Removing values from field based on other field values

I moved the field to the bottom of the form, removed all the hide whens, and the results were the same. The user approves the document, but their name is not removed from the field.

This is a web application as well, would this have any bearing on the code?

Thanks

David

Subject: RE: Removing values from field based on other field values

Could be, depends on how the logic is coded. Are we talking about a new document here, or about modifying an existing one? If you say, that this is “a web application as well”, do you mean, that you are currently using the web interface, or just that there is one?

It would probably be beneficial to get to know more about what exactly happens, when an approver approves. The code in RemainingApprovers itself still looks fine to me.

Subject: RE: Removing values from field based on other field values

This database is completely designed in Notes for the web. What happens when an approver approves their part is that they click an approve button which runs an LS agent, which populates the ApproverFlag_x field for that particular approver, and does a computewithform, saves the document, and returns them back to the main view of documents.

This would be on previously created document since they are approving the document. The approvers are not assigned until the new document is saved.

HTH

David

Subject: RE: Removing values from field based on other field values

You still didn’t mention if you observe this behavior when approving from the Notes client or from the browser or both.

When run in Notes, can’t you use the LS debugger to check, if the Approver_Flag_X item is set as desired, and what’s in RemainingApprovers after the ComputeWithForm?