Performing Calculations on Secondary data source - InfoPath Dev
in

InfoPath Dev

Performing Calculations on Secondary data source

Last post 08-17-2009 03:47 AM by StatReq. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 08-10-2009 03:43 AM

    Performing Calculations on Secondary data source

    Hello,
    I'm putting together an Infopath form using Sharepoint Lists as a data source. (Infopath 2007 and Sharepoint 2007)
    When I make these connections in Inofpath, I can add the lists as repeating tables in my form.
    However, I need a means of performing calulations within the form on the data contained in the lists.
    I have already inserted blank fields in the Sharepoint list that show up in the form and allow me to peform the calculations I need but when I submit the form, the user inserted data is refreshed to the original data stored in the Sharepoint list.
    Is there a means of breaking the connection for these calculation fields such that they maintain the values inserted by users?
    Specifically, the form is for customers to order stationery and have feedback as they fill out the form as to what the staionery will cost. This works fine.
    On submit (to a sharepoint document library), when the stationery supplier opens the form, the user inserted information has reverted to the original data stored in the source Sharepoint list, so they can't see the numbers required.

    If anyone has any clever advice or ideas around this, I'd appreciate hearing them.
    Thanks.

     

  • 08-10-2009 08:13 AM In reply to

    Re: Performing Calculations on Secondary data source

    Any field that you want to store data in has to be in the main data source of the form. You probably need to have a repeating group in your main data source with fields for information about the stationary order as well as fields for your calculated values. Then you can use drop down lists that use your SharePoint lists for a data source to allow the user to select from the available stationary options... does that make sense?

    Hilary Stoupa

  • 08-10-2009 09:34 AM In reply to

    Re: Performing Calculations on Secondary data source

    Hilary,

    thanks for the response.

    The DropDown approach was my first idea too but I was requested to change it to make the available items on the order form more immediately visible.

    I think what I really need to do is come up with a method of copying the data from the Secondary source to the Main source and perform my calculations from there.

     

  • 08-10-2009 09:44 AM In reply to

    Re: Performing Calculations on Secondary data source

    Is this a browser form? If not, and if you are using InfoPath 2007, I'd like to suggest you try qRules. It is free, and has a CopyData command that will copy repeating data from a secondary data source to the main data source. This will spare you writing code! A link to the download is available here.

    Hilary Stoupa

  • 08-11-2009 02:18 AM In reply to

    Re: Performing Calculations on Secondary data source

    Thanks again Hilary. Unfortunately, it is a browser form.

    Does qRules definitely not support browser forms?

    I'll have a go with it anyway, thanks for the suggestion. 

  • 08-11-2009 06:49 AM In reply to

    Re: Performing Calculations on Secondary data source

    Hilary, thanks for your advice again. Have just published the form using the CopyTable command in qRules and itseems to be doing what I need. It's also in a Browser enabled form though I haven't had the opportunity to forensically check the compatibility there.

    So far looks good though.

    Thanks.

  • 08-11-2009 08:01 AM In reply to

    Re: Performing Calculations on Secondary data source

    The current released version of qRules uses a class that isn't allowed in browser forms. Even with that class removed, some commands, like Copy Table, do not appear to work in the browser. We do hope to have an IPFS compatible version very soon, but I'm afraid 1.7 is not.

    Hilary Stoupa

  • 08-11-2009 08:21 AM In reply to

    Re: Performing Calculations on Secondary data source

    Hilary, the form I've developed is built in an Infopath and Infopath Forms Services environment and is showing no errors in the design checker.

    Admittedly, it does require that it be Administrator Approved before publication.

    Despite the lack of notification in the Design Checker, do you think qRules will ultimately preclude the form being filled out in a browser?

    Thanks again.

  • 08-11-2009 08:26 AM In reply to

    Re: Performing Calculations on Secondary data source

    Have you tried publishing, uploading as Admin Approved and clicking the 'Verify' button? That's where I have been getting errors, not in Design Checker.

    Hilary Stoupa

  • 08-11-2009 08:40 AM In reply to

    Re: Performing Calculations on Secondary data source

    Ouch, thats just about where I'm at right now.

    Too terrified to check.

  • 08-11-2009 08:45 AM In reply to

    Re: Performing Calculations on Secondary data source

    I don't believe you are going to like what you find.... that's why I mentioned the browser incompatibilities when I suggested qRules...

    Hilary Stoupa

  • 08-11-2009 08:54 AM In reply to

    Re: Performing Calculations on Secondary data source

    I don't have a Sharepoint Administrator here to install the template so I'll worry about it tomorrow.

    Do you know of any alternative methods to achieve the same ends? i.e. copying data to the main from a secondary source?

    Thanks again.

  • 08-11-2009 09:22 AM In reply to

    Re: Performing Calculations on Secondary data source

    For repeating data, the only alternative I'm aware of is to write custom code.

    Hilary Stoupa

  • 08-12-2009 04:34 AM In reply to

    Re: Performing Calculations on Secondary data source

    Hilary, do you mind my asking exactly where the qRules copyTable command fails when deploying to a server?

    I'm just trying to compare experiences. Currently mine seems to have loaded to the server but can't read from my original database.

    Thanks again,

    Nick.

     

  • 08-12-2009 08:25 AM In reply to

    Re: Performing Calculations on Secondary data source

    Hi, Nick:

    I'm sorry, I don't understand your question. In my tests, CopyTable simply failed when the form was deployed and used as a browser form. I'd click the button and nothing would happen -- my table would not copy. Mind you, this was in a custom build I had with no references to the dll System.Windows.Forms that IPFS fails form verification on. Also, it was a very simple example for my own testing -- copying one Main Data Source repeating group to another in the Main Data Source.

    Did you deploy the form you enabled with qRules? That is, was your SharePoint Admin able to enable it? What do you mean by: Currently mine seems to have loaded to the server but can't read from my original database?

    Hilary Stoupa

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