Quick Formula Editing - Find and Replace - InfoPath Dev
in

InfoPath Dev

Quick Formula Editing - Find and Replace

Last post 03-08-2011 07:25 AM by ashoke. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-07-2011 08:03 AM

    • ashoke
    • Not Ranked
      Male
    • Joined on 02-24-2011
    • Toronto, Canada
    • Posts 21

    Quick Formula Editing - Find and Replace

     Hi Everyone,

     I am working on a query form with several pages/views. Every page has got 960 formulas using expression box. One of the formulas is as follows: 

     sum(dfs:dataFields/d:top/d:transplants_NDD/@LungSingleChild[../../@PrgYear = xdXDocument:GetDOM("qYear")/dfs:myFields/dfs:dataFields/d:qYear/@qYear + 8 and ../../@Program = 29])

    I've inserted the formulas in one page then copied and pasted in other page to change the node's name only. For example, I want to change only LungSingle to Kidney. I still have to click and edit the every formula in the single line (non-expandable formula area).

    Is there any quick way to edit the formulas by page/views e.g. find and replace?

    Thanks,

    Ash

  • 03-07-2011 11:53 AM In reply to

    Re: Quick Formula Editing - Find and Replace

    Hi,

     I haven't tried it but off the top of my head I would think that you could export your template to source and do a global search/replace from the generated files...

     

    Be sure to take a back up first ;-)

    Josée Sévigny
  • 03-07-2011 01:51 PM In reply to

    • ashoke
    • Not Ranked
      Male
    • Joined on 02-24-2011
    • Toronto, Canada
    • Posts 21

    Re: Quick Formula Editing - Find and Replace

    Hi, Thanks for your reply. In theory, it's possible by saving source files. But practically, there are many issues coming up to my form and cannot save time.

    For me, it didn't work actually. After editing the source files (.xsf), I couldn't get back to the original form.

    Don't know if there is any other easy way or not. But it's killing me for such a huge form. In fact, I was expecting a source file like HTML source code.

    Thanks again for your quick suggestions.

    Ash

  • 03-07-2011 02:16 PM In reply to

    Re: Quick Formula Editing - Find and Replace

    To my knowledge these formulas are not located in the XSF files.

    Run a search within files using an enhanced text editor for a part of your formula and you should be able to find in which file.

    Josée Sévigny
  • 03-08-2011 07:25 AM In reply to

    • ashoke
    • Not Ranked
      Male
    • Joined on 02-24-2011
    • Toronto, Canada
    • Posts 21

    Re: Quick Formula Editing - Find and Replace

    Hello

    I found the formulas in .xsl file. Global search and replace worked very well. Your help is much appreciated.

    I tried to copy the expresion boxes from one file to another. It didn't transport the formulas inside the expression boxes. Now I'm doing it by different views of the form. And every view has got different .xsl file.

    There are so much to explore in InfoPath. I'm having lots of fun in it.

    Ash

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