qrules and replacing text in field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

qrules and replacing text in field

Last post 06-09-2011 08:48 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 06-08-2011 03:02 PM

    qrules and replacing text in field

    I have a complex form, that Im shifting into utilizing qrules to do the processing, but havent figured out how to do something. Basically, I want to use sharepoint list for my content source, and I need to replace specific fields in the content with dynamic data. So for example in the xml format Id do a concat(field1, field2, "some text") which would give me a dynamic output of something something2 some text. I want to store all of my report types in a sharepoint list, but concat isnt working, as its just displaying the data exactly as I type it. So is this possible??? What can I do??
  • 06-08-2011 03:39 PM In reply to

    Re: qrules and replacing text in field

    Hi:

    I'm sorry, but I'm confused. What qRules command are you using? Are you talking about submitting data to a SharePoint list? Or are you talking about something else?

    Hilary Stoupa

  • 06-08-2011 08:21 PM In reply to

    Re: qrules and replacing text in field

    I would like to populate my reports data with fields from a sharepoint list. My infopath form is a report generator, that allows the user to select which type of report they are creating, that dynamically takes sections in, according to what inspection they are doing. I would like to use sharepoint list as my source of the data vs using xml, as it seems more flexible to create new report types. I want to create a list with the content for these columns, but my challenge is that I need to be able to replace certain fields in the content with data entered into the form. I know qrules can do the trick, but pretty new to it, so not exactly sure how. Can you assist? Has anybody ever done it this way?? SQL would be fine too, I just want the users to be able to create new reports easily, so SPLIST seems like a better candidate.
    Filed under: ,
  • 06-08-2011 08:24 PM In reply to

    Re: qrules and replacing text in field

    an example of the data living in the sharepoint list would be sometext $variable sometext sometext sometext $variable sometext sometext sometext sometext sometext sometext $variable sometext sometext sometext $variable sometext sometext $variable sometext.
  • 06-09-2011 04:26 AM In reply to

    Re: qrules and replacing text in field

    I dont know if this direction is even possible. But the problem is, when I try to do a concat("this is a test of", somefield, "in", someplace), and retrieve that from xml, it comes out verbatum like that instead of actually processing it. Playing with different options, I was playing with using sharepoint fields, and if I could get this to work, this would be wildly easy to make new reports by just defining a few rules for when to call the specific content. I am trying to use qrules properly, but I am not that knowledgeable about it. Looking for the best solution that can be designed in infopath once, and as new content is added, it is dynamic enough to pull in the new content, and utilizing sharepoint is ideal. Please let me know what you think.
  • 06-09-2011 08:06 AM In reply to

    Re: qrules and replacing text in field

    Are you entering the formula in the formula editor? Can you attach a sample form under the options tab in a reply?

    Hilary Stoupa

  • 06-09-2011 08:43 AM In reply to

    Re: qrules and replacing text in field

    I make it work in the formula editor, and that works, but the section is a repeating section, that needs to pull the content from the XML file or some other external source to get all the content. If I enter the formula directly, it will just give me the same data over and over, which is not what I want.

  • 06-09-2011 08:48 AM In reply to

    Re: qrules and replacing text in field

    Having seen your form now, I'll paste in part of the reply I sent in email:

    I understand a bit better now what you are trying to do – use a formula as a default value in XML that is a secondary data source. The problem is that InfoPath is not going to process that as a formula (as you’ve seen).

    Instead, yes, I believe you could use SetValue for this.

    You'd want to add a rule on the Qdabra Rules data source finishedLoading node (with the condition that finishedLoading = true).

    That rule should set the Qdabra Rules data source Command field. Use a formula (that is, click the fx button next to the value field) and use a concat statement to create the SetValue command. You'll need to use a filtered XPath for the field you want to set (which is the main reason we created SetValue) and then another concat statement to create the value. You'll also need to include the dsname parameter to set the value in a secondary data source.

    Hilary Stoupa

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