Hiya
I’m currently encountering some problems with getting my status to work properly and also the hide/when options for these action buttons.
I have several views that require a user to change the status of something every now and then.
PROBLEM ONE - Hide/When:
For instance if a field in a view has a status of ‘Complete’ then the ‘Incomplete’ button should be present only. So in this case the formula used to hide the ‘Complete’ button and display the ‘Incomplete’ button should be: -
Complete action button = Status = “Incomplete”
Incomplete action button = Status = “Complete”
Am I right??
If so…this doesnt appear to hide any of the action buttons according to the status…
At the moment I have got the hide/when as…
Complete action button = Status != “Incomplete”
Incomplete action button = Status = “Incomplete”.
This sort of displays the actions buttons according to the status within the view…however after if i change the status of a field from ‘Incomplete’ to ‘Complete’ then back to ‘Incomplete’ the ‘Complete’ button stops showing…!
PROBLEM TWO: Buttons stop appearing…
As I already mentioned… if I change the status of a field from a view from ‘Incomplete’ to ‘Complete’, then back to ‘Incomplete’…the ‘Complete’ action button stops appearing for that particular field which i dont understand… - any ideas?
Hope that makes sense…
Can anyone shed some light??
Thanks
Gem
Subject: Hide/When Question?
Do a view refresh at the end of the button code if it is an action button. (incomplete/complete buttons)
If it is a button on a form, then select refresh feilds on keyword change as suggested by another member.
Subject: Hide/When Question?
You’ve shown us the hide-when formulas, but not the actual formulas for the buttons. What do those look like? Have you checked very carefully for spelling errors?
Subject: RE: Hide/When Question?
Hi, yeah I’ve checked for spelling errors.
Here is an example of the button code: -
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
If doc.status(0) <> "Complete " Then
doc.Status ="Complete"
doc.CompletedDate = Now
End If
Call doc.Save( False, True )
Set doc = collection.GetNextDocument(doc)
Wend
End Sub
Ive basically used the same code for the incomplete button and changed the words complete to incomplete…
Thanks
Subject: RE: Hide/When Question?
At least, this piece of code does contain a spelling error …
Subject: RE: Hide/When Question?
on button in compete you write as!status=“Incomplete”
on complete button you write as !status=“Complete”
and go to that status field and go to second tab of that field and enable all properties thats it
Subject: RE: Hide/When Question?
If this is an actual cut and paste from your code, there appears to be an extra space at the end of the first "Complete ".
Subject: Hide/When Question?
Did you indicate that the field that produces the condition has “Refresh fields on keyword change” set?
Subject: RE: Hide/When Question?
Sorry, dont mean to sound thick but where do i find this? In the form properties? - Im not use to notes much…
Thanks,
gem