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
fatihdiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
InfoPath

From novice to tech pro — start learning today.