Sharepoint Query fields to populate repeating table? - InfoPath Dev
in

InfoPath Dev

Sharepoint Query fields to populate repeating table?

Last post 04-20-2011 10:51 AM by shniggens. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 04-19-2011 07:56 AM

    Sharepoint Query fields to populate repeating table?

    Hi,

     

    I have a repeating table inside of a repeating section.  In the repeating section is a drop-down list box that picks the category of gear.  The CopyTable command is bound to this drop-down list box (also set query fields, query data).  The repeating table is filtered to only show items that the CategorySelector = GearCategoryFromTable.  This is all working great.

    I added a rule on the drop-down list box that if it is not blank, to disable it.  That way, they cannot pick that category again, causing duplicates.  This is a cheesy workaround for now.

    Another problem, when they add another section, they can pick the same category again, appending the table with duplicates.  If I could find a way to make the same selection in the drop-down list box not available in the next section, that would be nice.

  • 04-19-2011 03:16 PM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    OK, I got it to work with Qrules copytable command.  The only problem is, when you select the same item twice, it appends the table.  I don't want to use the /empty=yes switch.  Is there a way to filter out duplicate entries?  Or add a delete command that deletes duplicates?

  • 04-20-2011 07:53 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    Maybe add a condition on your rule that inserts to check first for the item in the repeating table?
    Hilary Stoupa

  • 04-20-2011 08:10 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    Hilary,

    Thanks for your response.  Here's what I'm trying to accomplish.

    I have a repeating table inside of a repeating section.  In the repeating section is a drop-down list box that picks the category of gear.  The CopyTable command is bound to this drop-down list box.  The repeating table is filtered to only show items that the CategorySelector = GearCategoryFromTable.  This is all working great.

    I added a rule on the drop-down list box that if it is not blank, to disable it.  That way, they cannot pick that category again, causing duplicates.  This is a cheesy workaround for now.

    Another problem, when they add another section, they can pick the same category again, appending the table with duplicates.  If I could find a way to make the same selection in the drop-down list box not available in the next section, that would be nice.

    But if I could find a way to filter duplicates, that would be the best solution.  Could expand on your line of thinking a little? 

  • 04-20-2011 08:41 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    I've attached a sample -- it isn't a qRules form, but has some rules on field 1 -- if you select something that already exists in the repeating table's field 2, you'll see an error message. Hopefully this will help explain a bit better.
    Hilary Stoupa

  • 04-20-2011 09:23 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    I used that condition and rule before the copytable command, and set it to "don't run the remaining rules if condition is met.  Works like a charm.  Thanks!

  • 04-20-2011 09:54 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    Perfect, glad you've got everything working!
    Hilary Stoupa

  • 04-20-2011 10:20 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    Wait, I got ahead of myself.  Once I add another section, it won't copy the table, because the condition is already met in the first section.  Doh!

  • 04-20-2011 10:29 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    My sample doesn't do that... what is different in your rule? Is the rule set on the field inside the repeating section, like my sample?

    Hilary Stoupa

  • 04-20-2011 10:51 AM In reply to

    Re: Sharepoint Query fields to populate repeating table?

    I have no idea.  My rule is identical to yours.  Same fields and everything. 

    I've managed to work around it by copying the entire table on form load, then filtering the results in the repeating sections.  Then, when users submit, I use the Delete command to remove everything with a zero value. 

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