Was there a better way? - InfoPath Dev
in

InfoPath Dev

Was there a better way?

Last post 03-13-2012 03:17 PM by Jay@Work. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 03-12-2012 07:30 PM

    Was there a better way?

    Now that I've already done it(!) I got to wondering whether there was an easier/quicker way to do what I've done...

    I needed to create a grid where users could enter numbers, at the end of each row was a total field which was the sum of all the values entered in that row.
    4 rows with 14 values and a total on each. I don't think I could have used a repeating table for the rows as the condition for putting values in the row differs from row to row.

    Only way I could see to do this was to create a table and then place a small text box in each cell. Then a formula in the last box.

    I couldn't import the form in from Excel as we don't use Excel 2010 here (but do Infopath 2010)

  • 03-12-2012 08:59 PM In reply to

    Re: Was there a better way?

    It doesn't seem that you've actually described the approach you did take, so it's hard to say how you could have done it better. :-)
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-12-2012 09:44 PM In reply to

    Re: Was there a better way?

    I used the only way I could think of doing it. A table with little text boxes.
  • 03-13-2012 07:37 AM In reply to

    Re: Was there a better way?

    I think what I'd question is the choice of schema - you have 4 x 14 fields in your form? But it sounds as if you already looked at this, and a repeating structure was dismissed because of conditions - although, I'd wonder if you could have used a repeating schema regardless - just have all the necessary rules with their conditions. Like Jimmy said, without more detail on the logic (why are the conditions for entering data in rows mutually exclusive? What is the form's purpose?) it would be hard to guess on this.

    Hilary Stoupa

  • 03-13-2012 12:39 PM In reply to

    Re: Was there a better way?

    Its a form to capture exceptions to a salaried employees timesheet.
    e.g. fortnightly period, employee works X hours and gets Y salary.

    If this employee ever does hours over their normal then they fil out this form.

    I've attached a screenshot of what I ended up doing.
    Seemed a lot of work putting in all the text boxes and then referring to them all for the total field (sum of all text boxes on that row)

    Only the allowances bit is in a repeating table as each row is identical

  • 03-13-2012 02:47 PM In reply to

    Re: Was there a better way?

    It seems like you may have been able to use a repeating schema - but you would have ended up adding instances to the form's defaults to include all the "days" - that is, you'd have a repeating Day group, perhaps, with a Week field (so you could have 1 or 2) and a DayId (so you'd have Mon-Sun or their day numbers)... and probably a Type field, to indicate the two types of OT and the TOIL. But I don't think it would really end up being much less work once you had the defaults all set. Although, your end schema would be simpler.

    Hilary Stoupa

  • 03-13-2012 03:04 PM In reply to

    Re: Was there a better way?

    ok thanks. I'm from a SQL Server (and more recently Sharepoint) background.
    Can you explain what you mean by schema within the context of Infopath please?

    Are we talking about the resulting XML schema of the template?

  • 03-13-2012 03:12 PM In reply to

    Re: Was there a better way?

    The form template has a schema which determines the structure of the XML created by the template.

    When you look at the main data source for your template - that's the schema.

    More here:
    http://office.microsoft.com/en-us/infopath-help/introduction-to-form-templates-and-forms-HA010062685.aspx
    http://msdn.microsoft.com/en-us/library/bb251017(v=office.12).aspx

    Hilary Stoupa

  • 03-13-2012 03:17 PM In reply to

    Re: Was there a better way?

    Coo thanks, that's what I thought

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.