-
You can do this with a Form Load rule. Just open Form Options from the tools menu, and in the Open and Save section, click the Rules... button. From there, you should be able to add the necessary logic to switch views accordingly.
-
A dropdown control is useless if it is not bound to a field. If there is not a field to store the control's value, the control can have no value.
But what you can do if you really don't want to store the value in the form's main data source is to create a simple "Form Logic" secondary data source from an .XML ...
-
I don't think you'll find anything as simple as VLookup in InfoPath, but XPath should be able to give you all the functionality that VLookup provides, and more. If you could give us an example of a data source and scenario where you would like to find a data value corresponding to another value, I or someone else here can show you ...
-
I'm not sure why it has to be inconvenient. You could do something like:
private XPathNavigator m_mRoot;
private XPathNavigator mRoot
{
get
{
if(m_mRoot == ...
-
At this point your SQL command is: execute "dbo"."VCS_SP_Remaining_Pays" HireDate Because you put HireDate in quotes as a string literal.
But aside from that, date literals in SQL are a bit tricky. What happens if you use: dc.Command = 'execute "dbo"."VCS_SP_Remaining_Pays" {d ...
-
Let's approach one issue at a time.
[quote user="acarita"]When I preview the form and try to run it, i get the following error.
The query cannot be run for the following DataObject: PayPeriodsDataSource
InfoPath cannot run the specified query.
[0x80040E14][Microsoft OLE DB Provider for SQL Server] Line 1: Incorrect syntax near ...
-
What you can do is store a reference to the most recently added row, which you can access later when the button is clicked:
XPathNavigator lastChanged;
int lastRowCount;
public void group2_Changed(object sender, XmlEventArgs e)
{
if (e.Site.Name.Equals("my:group2"))
...
-
Yup, that was the problem. Glad you figured it out!
-
I don't work with browser-enabled forms so I've never used the form state, but could you tell us why you want to store an XPathNavigator globally? I can't think of a whole lot of reasons why you would need to.
-
Might the field's name be LoginId with a lowercase D or Loginid with all of "ID" in lowercase? Please double-check the capitalization and if you can't figure it out could you post a screenshot of your data source?