Отвечено How to get Information in repeating table from two lists ?

  • 20 มิถุนายน 2555 23:35
     
      มีโค้ด

    HI , I have the following scénario :

    I have 3 custom lists ( Contact , Organization and  Project) in Project i have a loukup field to contact and in contact i have a lookup field to List organization 

    Project

    Title          AssociatedContacts

    Projet1    Contact1,Contact2

    Contact 

    FirstName Lastname                  AssociatedOrganizationName

    Contact1  Contact1LastName      Org1

    Contact2  Contact2LastName      Org2

    Organization

     ID    Title

     1      Org1

     2      Org2

    InInfoPath List Form of Project i want to display my associated contacts in a repeating table , I could do that but i want also to Get the OrganizationName in my repeating table because i get the ID of the organization and not the Name , sample

    Repeaiting Table 

    FirstName LastName Organization

    Contact1  Contact1LastName    1

    Contact2  Contact2LastName     2

    I want to get the organization name instead of ID  , How to get information in repeating table from two Lists ? 

    Thanks  To all 



    • แก้ไขโดย bouhmid86 20 มิถุนายน 2555 23:36
    •  

ตอบทั้งหมด

  • 21 มิถุนายน 2555 4:56
     
     
  • 21 มิถุนายน 2555 8:11
     
     

    http://sharepointsolutions.com/sharepoint-help/blog/2011/11/get-infopath-to-display-lookup-column-value-not-id/

    check it out


    Arpan Mukherjee

    HI ,Thanks for your replay but in his sample he shows direct lookups to his projects , not like mine because i want to get OrganizationName wich is lookup in Contact and contact is lookup in Project .

    Any Idea how to resolve this ?Thanks 

  • 21 มิถุนายน 2555 11:04
     
     
    so when you define a lookup to contact you can add a column to show the additional field "organizationname" from contacts table

    Arpan Mukherjee


    • แก้ไขโดย Arpan Mukherjee 21 มิถุนายน 2555 11:09
    •  
  • 22 มิถุนายน 2555 14:45
     
     

    HI Arpan ,

    Adding a lookup Organization Name dont appear in cloumns of contact when adding data source to infopath , it appear only in view , Any other  Idea ? thanks

  • 26 มิถุนายน 2555 10:32
    ผู้ดูแล
     
     คำตอบ

    Hi bouhmid86,

    Arpan's solution will work for your requirement.

    1. Add Contact list/data connection to InfoPath Form. Organization ID is display here instead of Organization Title.
    2. Please Add a data connection to receive data from Organization list.
    3. Add a calculated Value to the repeating table and we will use it to replace the AssocatedOrganizationName field.
    4. Set Data Source for the calculated value.

    Click fx button > Insert Field or Group > Organization list: Title > Filter Data > Add > ID = Contact: AssociatedOrganizationName.

    The final Formula should similar like this:
    Title[ID=current()/AssociatedOrganizationName]

              5. Test how it works.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    • ทำเครื่องหมายเป็นคำตอบโดย Emir LiuMicrosoft, Moderator 28 มิถุนายน 2555 4:20
    •