[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 885
  • Last Modified:

SHAREPOINT LIST , INFOPATH FORM HOW TO QUERY FROM THE FORM AND GET RELATED DATA TO THE FORM

HOW CAN I QUERY THE SHAREPOINT SITE LIST FROM THE INFOPATH FORM SAYING THAT BRING ME THE RECORDS THAT HAVE THAT TC-ID  SO I HAVE A TEXTBOX AND A BUTTON ON THE INFOPATH FORM AND BELOW I HAVE THE FIELDS FOR THE DATA IN THE LIST IN SHAREPOINT SITE WHEN I RUN THE FORM IT BRINGS ALL THE PEOPLE IN THE LIST BUT I WANT IT TO COMPARE IT WITH THE VALUE THAT I TYPE ON THE TEXTBOX AND BRING ONLY THOSE FROM THE LIST...when i look at the code for button click it is VB code, i know c# but i dont really know VB ....I am sending you the vb code screenshot and also the infopath design form ...what should i do...tnx
sort.png
vb.png
0
fatihdi
Asked:
fatihdi
  • 2
  • 2
1 Solution
 
Clay FoxDirector of Business IntegrationCommented:
You do not need any code.

Create a receive data connection to the list, you can browse it in the wizard.

Then drad the repeating data onto the form as a repeating table.

Go into properties for the table and the display tab.

Add conditional formating if data in the list does not equal data selected hide the rows.

This will then only show records with dates that match those selected.

There is no way to "query" a SP list.  The whole thing is loaded and then filtered.  The only thing you can do is statically filter the default view in SP, which InfoPath uses, to say today or the past week or whatever if that will work to reduce the number of records.
0
 
fatihdiAuthor Commented:
Hi
    I have done what you said for example I am trying to say " show me the records that have the TC-ID  (this is the datafield in the list)  that  I type into a textbox area" so I put a textbox and then try to view only records that have the same value as in textbox but somehow if i dont type anything into textbox nothing appears if i enter a TC-ID that exists all list is coming which I only want one record...my condition that I put to the table is...if TC-ID is equal to field9(textbox) ...what am i doing wrong why dont i see only one record and rest is hidden although my rule should provide this?
0
 
Clay FoxDirector of Business IntegrationCommented:
Make sure you are using conditional formating properly. Typically you enter criteria TC-ID NOT equal to field9, Hide
That way if a tcid does not match it is excluded

some times you can have issues with formatting, uppercase, extra spaces, different number types.  I would try a static variable to test first, then I often use expression boxes with no formatting of each field to verify what the values are raw and do they match.  Then you can use functions to clean them up if you need.
0
 
fatihdiAuthor Commented:
it helped but did not solve it 100%
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now