I have a database that (through an agent) creates 5 copies of a document and stores them with a new form name (So the original form name is “MasterProfile” and the agent makes 5 copies of the document and names them UserProfile – Using XXXX.Form = “UserProfile”). That works perfectly, when I look at the forms/documents within Ytria everything looks good there are 5 documents under the Form “UserProfile”
Now within the UserProfile documents there is a Hotspot that takes the document responses from the user and saves the form using
@If(@Command([FileSave]);@Command([FileCloseWindow]);””)
The problem I am having is that when that @Command[FileSave] runs it saves the document back to the original name “MasterProfile”. I have tried setting the Form Field to the correct name
FIELD Form := “UserProfile”;
but that doesn’t do anything.
Does anyone have any clue what I could be missing? Why isn’t the copied documents staying as UserProfile rather than converting back to MasterProfile?
Thank you for your help!
You should set another field instead of using the form field. The form field will always be set by Notes when the document is saved in the UI.
For example, you could make a DocType field and set it to MainProfile or UserProfile. Then in any appropriate Notes views you could add that DocType column in place of the Form column you are displaying. I’m not sure how Ytria works but hopefully you can view by another field besides the form field.
If you absolutely need to use the Form field for this purpose, you could try updating the Form field via the PostSave event, but I’m not sure if that’s possible.