Search - InfoPath Dev Sign in | Join | Help InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads Search More Search Options Page 2 of 3 (21 items) < Previous 1 2 3 Next > Re: Formula to calculate days off I added the space to in front of output, and added the {d \...} and then the form wouldn't open. I looked over everything and found one missing quotation mark that I added but didn't help. Maybe you can see something that I may have overlooked. var dc = ... Posted to Newbie Questions (Forum) by acarita on 07-23-2009 Re: Formula to calculate days off I edited the code to have {d\'" + HireDate + "'}" When I tried to preview the form, it failed to open. The error about the nvarchar was corrected by editing the Stored Procedure. I spoke with our SQL guy and he modified the query for me. We also have the code working to the point where it is looking ... Posted to Newbie Questions (Forum) by acarita on 07-22-2009 Re: Formula to calculate days off I added this line var HireDate = XDocument.DOM.selectSingleNode("my:myFields/my:HireDate") and I changed this dc.Command = 'execute "dbo"."VCS_SP_Remaining_Pays" ' + "myFields/my:HireDate"; to dc.Command = 'execute "dbo"."VCS_SP_Remaining_Pays" ' + ... Posted to Newbie Questions (Forum) by acarita on 07-21-2009 Re: Formula to calculate days off [quote user="Jimmy"] [quote user="acarita"]Since I was just querying the data that is there I thought it would be ok to create the secondary source.[/quote] Yes, it certainly is, but in that situation, you need to query that data source, and not the main one. Please try some code like ... Posted to Newbie Questions (Forum) by acarita on 07-21-2009 Re: Formula to calculate days off No, I set it up as a blank form and added the data source. The way I understood it, I only had to base the form off of a data source if I was writing data to the database. Since I was just querying the data that is there I thought it would be ok to create the secondary source. Posted to Newbie Questions (Forum) by acarita on 07-18-2009 Re: Formula to calculate days off Thanks for that, the form was setup using Visual Basic, I changed it to JScript and was able to get some where. I preview the form and click my Refresh button, I get the following error. The following error occurred: Object required File:script.js Line:25 Below is the code i'm using. Line 25 is the ... Posted to Newbie Questions (Forum) by acarita on 07-17-2009 Re: Formula to calculate days off Yea, sorry for that. I didn't realize that what that button did. :) I'm pretty sure it is setup to us JavaScript. Is that something I can change or do I need to start over if it isn't? The first line is DOM, I mistyped it when I entered it here. Posted to Newbie Questions (Forum) by acarita on 07-17-2009 Re: Formula to calculate days off I started looking at other ways to accomplish this. I found out it's possible to pass a filed from InfoPath into a Stored Procedure to get desired output. We have a database with our payroll calendar, so it made sense to create a stored procedure to pull remaining pays based off of HireDate. I want to pass my HireDate ... Posted to Newbie Questions (Forum) by acarita on 07-17-2009 Re: Formula to calculate days off Thanks for the link to your blog. I'm sure I will find it helpful, but I am having difficulty figuring out how to take your examples and modify them to achieve my goals. Reading your posts, however, did give me an idea. I created an XML datasource with all of the pay periods, and made a drop down list that uses the XML ... Posted to Newbie Questions (Forum) by acarita on 07-10-2009 Re: Formula to calculate days off There are 27 pay periods in 2009 as listed below. This is an example of what I would like to do. An employee gets hired on 7/27, there are 10 remaining pay periods in the year. So, using the formula .385x, where x=remaining pay periods, we get .385*10=3.85 The answer should than be rounded up to 4. There are a total of 3 ... Posted to Newbie Questions (Forum) by acarita on 07-09-2009 Page 2 of 3 (21 items) < Previous 1 2 3 Next > Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.