-
Sorry for being late,
Please add a try catch block around ''thisXDocument.UI.Alert(''Hello World'');'' and check out what exception it is throwing.
Steps you follow here are
1. Add ''try catch'' block to the statement.
2. Compile the solution and Publish it.
3. Open the form from sharepoint.
4. Attach Infopath form to your code and put a ...
-
I know one way how to do it in c# or vb.net i.e, Convert.ToBase64String() method, but I have never tried it with an image, I did it with regular files.
Check out if there is a ''Convert'' class in VB6.
Agni
InfoPathDev India
-
Hi Idisis,
When you are getting DOM, you are using ''DataObjects'' as a method where as ''DataObjects'' is a property(variable) so your first statement should be
''XDocument.DataObjects[''Test Procedures''].DOM''
Also please check whether you have created your dataconnection to the sharepointlist properly.
NOTE: From here on i will use c# Code ...
-
Hi Walter Gray, Welcome to the board!
I am not sure whether it works but please try it out and let us know if it works.
In your form schema have a field of type ''xsd:base64Binary''.
And convert your image into a base64 format and set that value to the field that you created.
Agni
InfoPathDev India
-
Hi Richard, Welcome to the board.
You made a small mistake in the following statement
total = dom.documentElement.selectSingleNode(''dfs:dataFields/d:dtOrderTracking/@OrderVal'').value; //it is the in this line that causes the error
You are placing ''i'' in between the string as part of the string, but value of ''i'' should go in place of ...
-
Hi Jason,
Welcome to the board.
Write your code in the onload method.
Here is the the method where you need to write your code in
[InfoPathEventHandler(EventType=InfoPathEventType.OnLoad)]
public void OnLoad(DocReturnEvent e)
{
//Write your code here
}
This is the method that executes when the form is loaded.
Note:Above method is ...
-
Hi Ryan, Welcome to the board
You need not write code in this scenario, you can solve this problem using xpath.
Map comp_name list box to ''dsf:Version''
Have this filter on it ''not(preceding-sibling::dsf:Version/@Component= @Component)''. By doing this you are filering duplicates of the Components.
Select ''Value'' and ''Dispaly name'' to be ...
-
Hi Christophe, Welcome to the board.
Can you provide with more inforamtion here, please copy paste your c# Onclick funtion here.
Probably you are hardcoding values which are not available when the form is published.
Agni
InfoPathDev India
-
Usually if we want add more fields to schema we will add them as optional fields.
If we want to enter values for these fields in the old forms,
Then you need to have an optional section in the UI which is binded to the new field, properties for this section will be
1. Include the control in the form by default.
2. Allow users to delete the ...
-
File attachments will be there in the main DOM(thisXDocument.DOM), means this will be part of form XML.
FYI
File attachments are stored in base64 format in the XML.
Agni
InfoPathDev India