Link to home
Start Free TrialLog in
Avatar of pratigan
pratiganFlag for United States of America

asked on

Lotus notes view not working using Trim

Strange thing.  It used to work, now its not.  I have a column in a view that is simply set as a filed value in a form.  that field value uses a trim command and checks a bunch of fields for being populated and create multiple entries in this filed which would then show in the column of the view.  The field is established as pending approvals. So the field indicates what groups still have not approved based upon the group name approval field being blank.  For example if the form is an assessment request and the PM approval is blank and the CL approval is blank.  The field should show values Project Management and Construction Lead.  Then in the view that column should show penidng approvals for those 2 groups.  But... the column is always empty.  ?!?!?!?!

Here is the logic of the field in the form that is directly selected as the column in the view.

EVDPending approval field in the form
@Trim(
@If (EVD_doc_type = "FRD" & EVD_appgrp_PM = ""; "Project Management"; ""):
@If (EVD_doc_type = "FRD" & EVD_appgrp_SME = ""; "BPO"; ""):
@If (EVD_doc_type = "FRD" & EVD_appgrp_ARCH = ""; "Architecture"; ""):
@If (EVD_doc_type = "FRD" & EVD_appgrp_RL = ""; "Requirements Lead"; ""):
@If (EVD_doc_type = "FRD"  & EVD_appgrp_HT = ""; "HIPAA Transactions"; ""):
@If (EVD_doc_type = "FRD"  & EVD_appgrp_HP = ""; "HIPAA Privacy"; ""):

@If (EVD_doc_type = "Assessment" & EVD_appgrp_PM = ""; "Project Management"; ""):
@If (EVD_doc_type = "Assessment" & EVD_appgrp_SME = ""; "BPO"; ""):
@If (EVD_doc_type = "Assessment" & EVD_appgrp_RL = ""; "Requirements Lead"; ""):
@If (EVD_doc_type = "Assessment" & EVD_appgrp_CL = ""; "Construction Lead"; ""):
@If (EVD_doc_type = "Assessment" & EVD_appgrp_TL = ""; "Testing Lead"; ""):

@If (EVD_doc_type = "Test Plans" & EVD_appgrp_SME = ""; "BPO"; ""):
@If (EVD_doc_type = "Test Plans" & EVD_appgrp_PM = ""; "Project Management"; ""):
@If (EVD_doc_type = "Test Plans" & EVD_appgrp_CL = ""; "Construction Lead"; ""):
@If (EVD_doc_type = "Test Plans" & EVD_appgrp_TL = ""; "Testing Lead"; ""):

@If (EVD_doc_type = "Documentation" & EVD_appgrp_SME = ""; "BPO"; ""):
@If (EVD_doc_type = "Documentation" & EVD_appgrp_PM = ""; "Project Management"; ""):
@If (EVD_doc_type = "Documentation" & EVD_appgrp_RL = ""; "Requirements Lead"; ""):
@If (EVD_doc_type = "Documentation" & EVD_appgrp_DOC = ""; "Documentation Team"; ""):
@If (EVD_doc_type = "Documentation" & EVD_appgrp_AUD = ""; "EDP Audit"; ""):

@If (EVD_doc_type = "PIV" & EVD_appgrp_SME = ""; "BPO"; ""):
@If (EVD_doc_type = "PIV" & EVD_appgrp_PM = ""; "Project Management"; ""):
@If (EVD_doc_type = "PIV" & EVD_appgrp_CL = ""; "Construction Lead"; ""):
@If (EVD_doc_type = "PIV" & EVD_appgrp_AUD = ""; "EDP Audit"; ""))

Thank You !!
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Up front: no idea why the field won't show.

Did you check the contents of the field using the Document Properties? Open the view, click a document that should display some value in the column, and check the fields used in the formula.

The obvious questions: Are all fields used single-value fields? Are field names written correctly?

Otherwise, write a test form, add text fields with the names above, add the formula above to a computed field, and modify the fields manually, then type F9 to compute. What happens?
Avatar of pratigan

ASKER

Hello Sjef.
Yes the filed is a multi value filed separated by newline.  I checked the doc in doc properties and the field is blank so the view appears to be working but the field not populating.  The strange thing is, it was working before.  If I copy a document from a test database that is showing the populated groups and copy that doc into my template design view, the filed shows the values but other docs in that view are not showing even though they have missing approval groups pending.
That almost sounds like an agent or some othwr piece of code that cleared the field. If you resave a document, is the field still empty? Can you search the whole design (using Ctrl-H) for the column field and check if there's somewhere a statement that clears that field?
strange things happening today in lotus notes.  When I right click on my templates now I no longer see the option to open in designer.  I have to open designer first and then through designer open the design template.
in fact.. the doc that I copied that does show the pending groups necessary... is showing 8 groups... if I open that doc and approve 5 of the 8 the view still shows 8 approvals pending.  its as if its not refreshing.  when I right click the doc and check the field properties it still shows 8 pending but only 3 in the firm still need to be checked...
ok interesting thing just happened.  If I uncheck a field and then save and close the doc.... now all groups pending approval show up.  Even though there were groups already unchecked but not showing in the view... but If I uncheck an already checked group...then the view reflects the correct approvals pending for every group.  However one of the requests that had 8 pending I checked 5 so view should have showed only 3.  view never changed and the field properties never changed.  if I unchecked just 1 then the view changed but the number outstanding was wrong.... definitely bis issues with notes today.  This makes no logic sense.
ok.. I did find a filter that was blocking the refresh and valuation of that field properly so I can fix that.  However there are intermittent issues with the form refreshing and not refreshing.  I'm going to fix the filter issue first and see if that clears up the intermittent refreshing issue.
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Sjef.  Yes when the field is empty the value of that group is placed in the field because the field represents the groups that still need to approve the requests.  therefore if the approval field is blank then they did not approve the request and therefore that group name will show up in the view for groups still pending approval.
Thanks !!
Er... Why do you have so many fields? Everything seems so "fixed", e.g. the names of the fields represent groups. What if a group is added to the game? You have to modify the code, haven't you?

I'd expect a field DocType and one field ApprovedBy, the latter a multi-value field containing all groups having approved the request. I'd also expect some rules (in Rules documents, or in a profile document) that contain the required approvers by DocType. The idea would be to fetch the required approvers, and match them with the currently collected approvers in the field ApprovedBy. The match could simply be
     @Trim(@Replace(RequiredApprovers; ApprovedBy; "")=""

This still won't help you correct the problem, though... Any progress?
yes... modifying the code to the filter resolved the problems. I found there were server issues friday that were causing update delays and communication problems.  Between the two, it looks ok.

The problem with the multiple fields is that based upon doc type and doc category, certain groups require approvals.  Therefore the approvers required changes with category and type selection.  I found it easier to list all the approval groups as separate fields and then using hide when logic when those groups do not need to approve requests.
Thanks Sjef,..... looks like I'm up and running.
Splendid :)
Always a true benefit in assisting with problem resolution.  
Pleasure working with you !!
Thank You !!
I'll transfer that message to my French partner/client, who thinks very often that I'm a regular PITA... I told him over and again that it's actually he who is the PITA, not I. The nerve...

Thanks ;)