qRule Repeating Table.. - InfoPath Dev
in

InfoPath Dev

qRule Repeating Table..

Last post 02-06-2013 07:25 PM by tyty4u2. 18 replies.
Page 1 of 2 (19 items) 1 2 Next >
Sort Posts: Previous Next
  • 12-06-2010 12:47 PM

    qRule Repeating Table..

    A question……  Following the pdf

    http://www.infopathdev.com/files/folders/qrules/entry58577.aspx

     I initially created a form with multiple views.   View 1 – text fields (strings) used for entering data into the form which inturn is saved on a sharepoint list.  View 4 (Search) – created a text field (Study Number) that will search the sharepoint list for the data entered in View 1.  Once match found, hopefully populate the repeating field. My question is since I used basic text fields in View 1, do I have to change those to repeating fields AND THEN use them View 4.  This seems like a conflict.  Maybe I create some tempfields to catch the data found???  Don’t know. Chris

     

  • 12-06-2010 01:00 PM In reply to

    Re: qRule Repeating Table..

    Hi there:

    So you are trying to search your SharePoint list for multiple values? I'm trying to understand why your "search" field has to be repeating?

    It seems to me your main data source would have a text field for your search term, and a repeating table you'd copy your results into. Perhaps there is some complication I don't understand?

    Hilary Stoupa

  • 12-07-2010 08:10 AM In reply to

    Re: qRule Repeating Table..

    I'll try and rephrase.  sorry for the confusion.

    I have multiple view form.  User enters info that is put into a Sharepoint List.  In View 4, I want to be able to search that sharepoint list and return info to a repeating table.  When that info is returned, the user will have to input more data that will become part of that row of data.   I believe qRules can do this, I just dont know how to do it specifically.....

    Scenario breakdown:

     View 1 (Audit Request).  Have several text fields

    • Protocol Number
    • Study Title
    • Protocol Date
    • Director Name
    • Phone Number
    • Project Number

    View 2

    View 3

    View 4 (Search).  Here I have ONE text field called Study Title (where the user types in search criteria).  Based on exact match, I would like  data returned to a repeating table.  Your pdf describes how one can setup a dropdown field, which i dont want.    I know the qRules uses the syntax: FilterOwssvr /dsname=<study title> /filter=<column> /value=  ???   I am just not sure for an exact match, what is the correct syntax.  Also, do I need to concatenate as described in the pdf?

    • Protocol Title 
    • Director Name
    • Phone Number
    • Project Number

    My question is.... I create a repeating table, with 4 columns.  Do I need / name these fields different from the View1 fields - tmpProtocolTitle, TmpDirectorName, TmpPhoneNumber, TmpProjectNumber since these fields in View 1 are basic text fields?  Since it is returning data for these fields that is already there, I dont think there is a need for re-writing these 4 fields if that makes sense.

  • 12-07-2010 09:16 AM In reply to

    Re: qRule Repeating Table..

    Okay, now I have enough info to actually help you. Thanks!

    As to View 1 -- how are you handling getting the info from your form to the list? Do you already have something in place? Or were you planning on using qRules? If you were planning on using qRules, I'd have a repeating group that contained all the fields you are using in view 1. If you only want the user to be able to enter a single audit request at a time, simply don't allow them to Insert / Delete the repeating section that the controls are in. Then, I'd use those same field on View 4.

    However, they can be separate sets of fields -- View 4 can have fields in a repeating group, View 1 can be non repeating. To use SubmitToSharePoint list for both, you'd need to have 2 mappings, and 2 SharePoint submit connections.

    As to your concern about the tutorial using a drop down, the same logic applies if you are using a text field as far as setting up the command. Your command would need to use a concat formula because you want to pass in the value of the StudyTitle field to the command.

    So, for the parameters, the /dsname is the name of your owssvr.dll data source. Your /filter is the name of the column you are filtering on. The /value is the value of your StudyTitle field. If you are running the command on the change of the StudyTitle field (which is what makes sense to me), your formula would probably look like (replace bold with actual values):

    concat("FilterOwssvr /dsname=MyDataSourceName /filter=MySharePointColumnName /value=", . )

    That dot would be where you've selected the StudyTitle field using the Insert Field or Group button.

    Now, at this point, you should have the correct data in your owssvr.dll data source. Drag the data fields onto your form while you are testing so you can verify when you start getting results (you can also test in a browser window by manually adding the filter).

    Since you want to make changes to that data and save it back to SharePoint, you'll have to then copy the data returned from the owssvr.dll data connection into the main data source of your form, and finally, use SubmitToSharePoint to update those list items. This means you'll need the SharePoint List ID in your main data source, so add a node for the ID to your repeating group that has the other infomation (Protocol Title, etc).

    I'm sure all this seems a bit overwhelming, so I encourage you to work through it a step at a time, verifying as you go. In other words, make sure your FilterOwssvr command is working first and returning data prior to adding a command to copy the data into the main data source, and so on.

    Hilary Stoupa

  • 12-07-2010 01:24 PM In reply to

    Re: qRule Repeating Table..

    okay this helps out a lot but i have some questions stilll... So what we or I hope to do is do this in pieces because as you said, it is kind of overwhelming what described.  Also, I keep my format the same of using basic text fields in View 1 (NOT USING REPEATING FIELDS HERE). 

     1.) okay i have followed the instructions of the pdf.  since i am NOT using a dropdown box and a regular text box for entering data, i:

    • Did not do steps 1 - 4 because I am not using dropdown field.
    • the instructions mention creating a command dynamically.  So I completed the next steps from the Preparation section of the pdf.  I named this FilterOwssvr per instructions.  command statement now looks like this: concat("FilterOwssvr /dsname=FilterOwssvr /filter=Protocol_Numbers /value=", .)   I am a little concerned about the Protocol_Numbers.  In sharepoint the column name is Protocol Numbers.   I did not know whether to do a insert field or group or just type it in as I did here. 
    • I setup the condition that field "is not blank" as instructed in the instructions.   Not sure i understand this step though......
    • Since the user is typing in the search info, i created a button next to the field called "Find".  Does the above rule need to go here and NOT on the search field itself?

    lets get through this part first please. 

     

    chris

  • 12-07-2010 02:08 PM In reply to

    Re: qRule Repeating Table..

    There is no point in running the FilterOwssvr command if the field you are searching on is blank. That is why the rule has a condition.

    Yes, if you want users to use a button, the rule would go on the button.

     You are going to need to find out the correct name for your column. Did you try step C on Page 2 of the PDF? Can you post a screenshot of the results so that I can help you with your column name?

    Hilary Stoupa

  • 12-08-2010 08:50 AM In reply to

    Re: qRule Repeating Table..

    here is a screenshot of the XML:  (if this image does not come out right, the line of code is

    - <s:AttributeType name="ows_Protocol_x0020_Numbers" rs:name="Protocol Numbers" rs:number="57">
      <s:datatype dt:type="string" dt:maxLength="512" />

     

     For this command statement, since i am trying to apply it to the button, now looks like this:

    concat("FilterOwssvr /dsname=FilterOwssvr /filter=Protocol Numbers /value=", Study Number)

    I am thinking that because i am moving this rule to the button instead of the original search text field, the "." at the end, will change. I will have to do an insert field/group and select now Study Number field correct???

    concat("FilterOwssvr /dsname=FilterOwssvr /filter=Protocol Numbers /value=", Study Number).

     So in Summary, I have:

    1.) View 4 - created a text field called "Study Number" and a button next to it called Find

    2.) Applied steps 5 - 10 of the pdf including the Preparation part of the pdf to get the column name from the XML. 

    ** i maintained the basic text fields as you stated I could do for View 1 which is using the submit data type connection (primary NOT secondary). 

     so now for the next step, i have created a repeating group and the returning data fields based on exact match from the above study number field are:

    tmpStudyTitle, tmpDirectorName, tmpPhoneNumber, tmpProjectNumber

    again, based on the exact match, i was hoping to return data to these fields.  I did it this way because as i stated, in View 1, i used basic text fields for one entry. 

    Now inorder for me to actually see if the above steps i did, worked, i would have to publish this form first correct?  Or what are your recommendations for next steps...  I would like to purchase this software soon.

  • 12-08-2010 09:54 AM In reply to

    Re: qRule Repeating Table..

    what exactly does this error mean:

     The following data connections contain queries with parameters: QdabraRulesValidation........

  • 12-08-2010 10:16 AM In reply to

    Re: qRule Repeating Table..

    The command would actually be:

    concat("FilterOwssvr /dsname=FilterOwssvr /filter=Protocol_x0020_Numbers /value=", Study Number)

    Yes, you will need to select the Study Number field using "Insert Field or Group". Put your FilterOwssvr data source on the form and preview. Enter text for the study number and click your button and see if you get results. Be sure to add the error node from the Qdabra Rules data source onto your form too, so you can see if you are getting errors on your command.

    As to your error in your other post about parameterized queries -- isn't that just an informational message in the design checker?

    Hilary Stoupa

  • 12-08-2010 11:41 AM In reply to

    Re: qRule Repeating Table..

    okay....... i think we are just about there........kinda.

     fixed the the command statement to what you stated.

    The rule is setup on the button.  I go to the main datasource and select the Protocol Title field and drag it to this view 4.  I previewed form by typing "13445" in the text box and clicked the button.  Nothing in the Protocol Title.......  Soooooo.......

    1.)  I go to the FilterOwssvr (secondary) data source and notice that it does not list the fields as described in the pdf. ( i did drag the FilterOwssvr to the form and all it gave was a data text box)  see image:

     if you cant see the image, it is rs:data and does not list the other fields....XML tree, sub sSchema (id), sub Element Type (name, content, rsCommandTimeout), sub AttributeType (name, rs:name, rs:number.......), rs:data

    dropped the error node from the QRules as requested and previewed and it did not list any errors.... played around with the other QRules - added Result to the page and it listed:

    http://wssdas.intranet.dow.com/rsga/qau/_vti_bin/owssvr.dll?Cmd=Display&List={D547833E-6E44-442E-99DC-1D2A3F5C5AF4}&XMLDATA=TRUE&FilterField1=Protocol_x0020_Numbers&FilterValue1=13445    

    this is correct i believe because it is the same info from the Preparation setup with the "13445" i added from submitting the form previous for test data to filter on.....  Also added the QRules Success and after running the search on 13445, it checked..........

    so as i stated, i must be close, but i missed something......

     

     

  • 12-08-2010 11:46 AM In reply to

    Re: qRule Repeating Table..

    I can't see your screenshot. Can you just attach as an file under Options in a reply? What happens if your click that link you posted that shows the filtered URL -- are the results in IE what you expected?

    It almost sounds as if when you first created your owssvr.dll data you didn't have any data in your list... since your schema sounds from your description not to have the fields from the list.

    Hilary Stoupa

  • 12-08-2010 12:50 PM In reply to

    Re: qRule Repeating Table..

    AWESOME.  i redid everything (except I had data in the table this time FIRST) and fields did show up!.  My question is i noticed that not all the fields showed up.... is that because it only (FilterOswwsv) shows fields with actual data in them?  Lets say if i the next entry someone makes, and they complete more information, will the extra fields show up then?

     Okay, for the filling of the repeating table, i take i need to now follow the "Copy Sharepoint List Values To Infopath Repeating Section Fields" pdf?

    1.) with the first section, since i have my main data source, do i need to setup fields and groups similiar to what they describe on page 2

    2.) Do I use the FilterOwssvr filter (secondary) for creating the repeating table and delete the columns i dont need?  If not how is this done?

     

     

  • 12-09-2010 11:25 AM In reply to

    Re: qRule Repeating Table..

    Okay, I have played around with the FilterOwssvr today with basically dragging over the repeating table and doing a search to populate it......  Basically it seems to work well....... i think.

    Do you recommend the pdf I describe in the last post OR do you suggest another one?   Based on the search and the return of a set of data to the repeating table, I would like to select one of the rows of data from the repeating table and complete the other text fields associated with WILL be associated with row item which would be

    Audit Location, Comments, date and time planned, ........

     Is this possible? 

     

  • 12-09-2010 11:36 AM In reply to

    Re: qRule Repeating Table..

    I think you can do that using simple rules. I get a bit confused about which data source you talking about sometimes, but if you want to take values from the dataset returned by your owssvr.dll data connection and populate fields in your main data source, you can use rules. You'll need to use a filter to get the correct value from your owssvr.dll data source when you select the field that has the value you want.

    If you are trying to populate repeating main data source fields (that is, you have 4 rows in your main data source, and you want to populate the 3rd row), you may need to use the SetValue command from qRules.

    Hilary Stoupa

  • 12-10-2010 11:12 AM In reply to

    Re: qRule Repeating Table..

    Because of the success of this search setup , i just purchased the qRules 2.4.....

    I do have a few questions based on this scenario........  the text field is setup and I am using the FilterOwwsvr filter (secondary) as my repeating table.  Person types in search and the repeating table returns values......   with that said: 

     1.) Do the qRules provide for a way to select one of the Repeating table rows?  Meaning if i type in a number and it returns 3 rows of items and I want to select maybe row 2, does qRules have a way of "selecting" that row item?

    2.) If #1 can be done, is it possible to then complete additional fields based on this row item selection?  Additional fields would be:

    • Principal Investigator
    • Audit Phase
    • Audit Location
    • Comments

    How would this be done? 

    3.) After completing step two, i would like to submit this to basically create a new row/column.........  Is this possible?  How?

     

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