-
You should be able to create a button with the action 'Save & Close' this will ask the user for a save location (if it's a new form) or save over the top of the form wherever they currently have it.
The same effect (without the automatic close) would be if they select File > Save or File > Save As
If you must use code ...
-
I think I understand. You want the drop down box to only contain the values which are relevant to certain condition.
But we need more information about the condition - does it change depending on what the user enter earlier in the form? Maybe you want it to be based on their logged in user name?
Rather than looking for a 'click' event - ...
-
You could dump the XDocument.xml property to a text file - but I don't know how you would 'remove' the user's access - you'd have to adjust file permissions?? Perhaps you could use a shell command to cacls.exe (could be dangerous).
Another way, if superficial 'hiding' from user is suitable - before saving to file you ...
-
I can't/don't use C# (or whatever it is) in my forms - but you could try the same concept I use to 'submit a form to a file'.
Use an object model like File System Object to create a text file and just save the XDocument.xml property to it. Tada.
-
Two attachment controls bound to the same field. Put them both in the same place in the repeating section/table. Make one 'read only'. Put conditional formatting on them to make the 'read only' one invisible when the condition isn't met and the 'non-read only' one invisible when the condition is met. No extra sections ...
-
I had similar problems in my workplace - the Network object would not be created (permission denied when I debugged) but Infopath reports no error when the form was opened - just an empty field.
I have 2 solutions I used - get user to enter their login name into a field - then use the 'IsCurrentUser' function of Infopath to validate ...
-
If they are all from the same Infopath template you could use the built in Infopath merge function (File > Merge forms).
-
Cheat - try jScript sendKeys to send '^p' and '^s' (Ctrl+P and Ctrl+S). Doesn't require fulltrust (from what my experience has been).
Note that Ctrl+S might not do anything if no changes has occured in the form - maybe your could do something with a 'XDocument.isDirty()' check.
-
This might be a 'lateral' idea - but why not add a view to your template which has two fields displayed and one 'support' field.
The first field should hold your 'xml snippet' (just set in code the way you currently save to file' and the second a file attachment field.
Now have a button which sends the form by ...
-
Could you make an additional secondary data source (retrieve values type) and ask it to retrieve the values from the table with the user names and the dates? This would be ok for an SQL database - not sure on Sharepoint.
Then set a filter on the secondary datasource which is based on the currently selected value of the user name and requery it ...