Hi All,
Any advice/suggestions would be much appreciated on the following issue I am experiencing.
Overview:
I am trying to get a count of the matching WinAccounts from a datasource via a Web Service. So a user opens the form, they click Get Count, the form accesses a datasource and finds how many matches there are for the current form user.
If there is a match then a count is successfully returned which is great - exactly what I want. However if there are no matches, an error is displayed. It needs some kind of error handling for the event that there are no matches.
Error:
The query cannot be run for the following DataObject: GetContact
InfoPath cannot run the specified query.
The SOAP response indicates that an error occurred on the server:
Server was unable to process request. ---> Failed to Get Contact for User1 ---> Failed to Get Contact for User1 ---> Failed to get contact details for User1
---> Failed to get contact details for User1
Details:
I have 1 field called Count.
I have 1 DataConnection called GetContact. This is a RECIEVE connection using a webservice. The DataSource has 2 columns, ID and WindowsAccount
I have 1 button on the form called 'Get Count'.
I have 3 rules on the button Get Count as follows:
Set query field for web service to current form user
- Set a fields value: WindowsAccount (a query field on GetContact Data Connection) = userName()
Execute Query
- Query using a data connection:GetContact
Get Count
- Set a fields value: Count = count(ID)