Contact Selection Box in a repeating group ? - InfoPath Dev
in

InfoPath Dev

Contact Selection Box in a repeating group ?

Last post 09-02-2008 11:36 AM by Catharine. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-29-2008 10:12 AM

    Contact Selection Box in a repeating group ?

    Hi

    I have a number of Contact selectors in a form working successfully.

    I now want to have a table with one column of the table being a contact selector, and the second column being a value calculated based upon the result of the contact selector.  And a third column a dropdown list

    I have set up...

    Interviewers (repeating)
     People (repeating
       DisplayName
       AccountId
       AccountType
     FocusArea
     Email

    And I have tried to set rules to set the value of e-mail based on the value in DisplayName - but it does not seem to be working.  Is this the correct Data Structure to achieve what I want to achieve?  How can I ensure that when a new row is inserted the correct values are used ?

    Catharine

  • 08-29-2008 06:01 PM In reply to

    Re: Contact Selection Box in a repeating group ?

    Your data structure looks good. What does your rule look like?
    Hilary Stoupa

  • 09-01-2008 03:26 AM In reply to

    Re: Contact Selection Box in a repeating group ?

    Hi,  I had slightly simplified my structure in my pervious post - here is the actual structure with the Rules set up on the InterviewersContractSelector Group 

    InterviewersContractSelector (repeating group)
     People (repeating group)
       DisplayName
       AccountId
       AccountType
     InterviewersFocusArea
     InterviewersEmail
     InterviewersAD

     

    This is the extract from manifest.xsf showing the rules

    <xsf:ruleSet name="ruleSet_66">
       <xsf:rule caption="Set the Email" condition="my:Person/my:DisplayName != &quot;&quot;" isEnabled="yes">
        <xsf:assignmentAction targetField="my:InteviewersAD" expression="substring-after(my:Person/my:AccountId, ../my:FormCalculations/my:DTINETTEXT)"></xsf:assignmentAction>
        <xsf:dialogBoxExpressionAction>my:Person/my:DisplayName</xsf:dialogBoxExpressionAction>
        <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;CurrentUser&quot;)/dfs:myFields/dfs:queryFields/tns:UserInfo/tns:userName" expression="my:InteviewersAD"></xsf:assignmentAction>
        <xsf:queryAction adapter="CurrentUser"></xsf:queryAction>
        <xsf:assignmentAction targetField="my:InterviewersEmail" expression="xdXDocument:GetDOM(&quot;CurrentUser&quot;)/dfs:myFields/dfs:dataFields/tns:UserInfoResponse/tns:UserInfoResult/UserInfo/UserInfoResult/mail"></xsf:assignmentAction>
        <xsf:assignmentAction targetField="my:Person/my:DisplayName" expression="&quot;&quot;"></xsf:assignmentAction>
        <xsf:assignmentAction targetField="my:Person/my:AccountId" expression="&quot;&quot;"></xsf:assignmentAction>
        <xsf:assignmentAction targetField="my:Person/my:AccountType" expression="&quot;&quot;"></xsf:assignmentAction>
       </xsf:rule>
      </xsf:ruleSet>

    (Is there a better way to cut and paste the rules ?)

    Catharine

  • 09-01-2008 07:15 AM In reply to

    Re: Contact Selection Box in a repeating group ?

    So, if People is a repeating group, there would be more than one Display Name, is that correct? And even though there is more than one Display Name, there will only be one Interviewers Email per that People group?

    I should have been more precise when I asked you about your rule -- I would have been fine with a description and the XPath of the formula you were using to fill the Interveiwers Email. I'm sure you've already checked this, but when you run your "CurrentUser" query, are you getting back the expected results? That is, you are sure the mail field in that data source is not blank after your query has been run?

    Hilary Stoupa

  • 09-01-2008 08:03 AM In reply to

    Re: Contact Selection Box in a repeating group ?

    People is required to be a repeating group by the contact selector.  I only ever want one item.  In the properties of the contact selector there is an option for Max lines which I have set to 1 so I hope that will prevent people selecting more than one..... if they do select more than one I want to only use the first one....

     I have tried to check the Current user query - the value that I am using in the test is the value that works correctly in the other 5/6 contact selectors on the same form.

    BUT  when I try and put a dialogue box in the first item of the rules - just to show that the rules are being called - nothing being displayed.

    BUT(again!)  the rules seem to be doing something as the contact selector is being cleared ....

    I really don't know what is going on...

    Catharine

  • 09-01-2008 10:03 AM In reply to

    Re: Contact Selection Box in a repeating group ?

    Just for testing purposes, grab the query & data fields from your current user data source and drop the whole thing on your form somewhere it won't make a mess, like the end of the form. That way you can see if the query runs. Then, maybe deselect your current rules so they don't run, and start adding them back, one at a time, as a new rule set. That way you can verify each step of the way. It may help you figure out what is happening...

    Hilary Stoupa

  • 09-02-2008 10:42 AM In reply to

    Re: Contact Selection Box in a repeating group ?

    Hi,

    I have created a completely blank form.  And tried to create a contact selection inside a repeating table same structure as shown in previous posts.  I do not have any rules or other processing - I cannot get it to work at all.  When using the contact selector outside the repeating table it works correctly.

    I really need some advice with this...  Does anyone know if the contact selector can be used inside a repeating table ? 

    Catharine

  • 09-02-2008 11:36 AM In reply to

    Re: Contact Selection Box in a repeating group ?

    Finally I have this working.

    My Data Structure was not correct.

    I had 
    InterviewersContractSelector (repeating group)
     People (repeating group)
       DisplayName
       AccountId
       AccountType
     InterviewersFocusArea
     InterviewersEmail
     InterviewersAD

    I should have had
    Table(repeating group)
       InterviewersContractSelector (group)
        People (repeating group)
          DisplayName
          AccountId
          AccountType
      InterviewersFocusArea
      InterviewersEmail
      InterviewersAD

    Catharine

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