I am working on setting a default value for a feild in a view I have completed the web side of things but I was instructed to go into the postopen form and write something like if isnewdoc then default the daysopen field to a value of "1". this is what i tried and it didn't work any advice on how to do this.
If uidoc.IsNewdoc Then Set doc = uidoc.Document Call doc.ReplaceItemValue("daysopen","1")
Call doc.Save(True, False) Set doc = view.GetNextDocument(doc)
How I could use postopen and put code in there so that "daysopen" would get a default value of 1. I originally did an if statement with @today in the field but that made it run far to slow. So I wrote an agent and now it runs faster it just doesn’t get the first day "1" because the agent only runs once a day so until it runs it is blank. I need a code that would set the default in the client postopen that so it doesn't slow it down. Any Ideas?
Please help me fix this.
PS. I am using a form for this and need to write code into the postopen form to get the default vavle
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!