Search a text box of infopath form

Hi,

I would like to search a field in all the infopath forms in a form library.

In order to perform a search, I believe I have to promote that field, however, then the field is promoted, the text got truncated and won't be able to get everything in the textbox.

Will that promoted field still contains all the text if I use CAML query? I know when it is displayed in the library, text is truncated.

Is there a way to perform a search easily either:

  1. by searching the xmls without promoting the field (I will have thousands of forms)
  2. tricks that I can use the promoted field to perform the search.

Thanks in advance.

August 21st, 2015 1:59pm

Hi wkpli,

As single line of text column only stores at most 255 characters in SharePoint, so the value stored in the column will be truncated if there are more than 255 characters.

But the whole value is still existed in the form and SharePoint search can parse InfoPath xml files, so we can search with the values in the form as keywords and get the forms in search results.

However, if you want to use the managed property of the promoted column when searching the forms and using the truncated value as keywords, then the forms will not be searched.

Because the promoted field does not contain all the text and it only stores the text displayed in the library even though the whole value displays in the forms.

I recommend you to search with the values displayed in XML(InfoPath forms) files directly to get the forms.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 3:58am

Thanks Victoria.

Just wonder if there is a quick way to search all xmls with keywords? Or do I have to open each xml one by one and do the search?

Thanks in advance.

August 24th, 2015 8:20am

Hi wkpli,

You do not need to open the xml files when you do search.

You can just type the keyword in search box and you will get the results in result page.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 11:09pm

Thanks Victoria. But I think what I want is if I can search just for that textbox in the infopath form. Not anywhere in the form in general. Is there a way to search just for that field/tag if I am using your approach?

Thanks

August 25th, 2015 9:40am

Hi wkpli.

I am not sure about your requirement.

Do you want to display the forms with the textbox which contains the keyword you searched in search results?

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 11:12pm

Here is what happen:

I have an infoPath form which has different information.

Let's say:

Name, Age, Interests, Education and etc.

I will setup a search so that it will search any form which has certain interests.

That means, it will search only the "Interests" field. And since there is a possibility that there will be more than 255 characters, so I can't use the promote options as the information will be cut off. So, you suggested searching the xml form

Now, I would like to know how to specify this "Interests" field so that I can perform a search.


Thanks

August 26th, 2015 10:08am

Hi wkpli,

If you search with the managed property for Interests, you can only search with value that not truncated.

If you want to search with the value that are truncated in the Interests field, then you can only search with the keyword from the truncated value without using the managed property for the column.

For example, there is a value for the Interests column is "test......share" ('share' is truncated in the column).

We can search with 'Interests:test' to get the form(if managed property for Interests column is called Interest) or we need to search with 'share Path:the URL of the library' to limit the results only from the library.

Or you can change the text field to multiple line of text field in the form.

Then you need to re-create all the forms.

Thanks,

Vi

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 10:38pm

If I have to promote the field "Interests" in the infopath form, and then add this Interests field to managed property, will this field have a 255 character limit? Or should I be able to search the whole field? The reason I am asking is when I promote the field interests and I only see the cut off Interests text in the form library, how about search?

Thanks,


  • Edited by wkpli 13 hours 48 minutes ago
August 27th, 2015 1:52pm

If I have to promote the field "Interests" in the infopath form, and then add this Interests field to managed property, will this field have a 255 character limit? Or should I be able to search the whole field? The reason I am asking is when I promote the field interests and I only see the cut off Interests text in the form library, how about search?

Thanks,


  • Edited by wkpli Thursday, August 27, 2015 5:51 PM
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 5:51pm

If I have to promote the field "Interests" in the infopath form, and then add this Interests field to managed property, will this field have a 255 character limit? Or should I be able to search the whole field? The reason I am asking is when I promote the field interests and I only see the cut off Interests text in the form library, how about search?

Thanks,


  • Edited by wkpli Thursday, August 27, 2015 5:51 PM
August 27th, 2015 5:51pm

Hi wkpli,

The managed property will have the 255 character limit because it is for the field in SharePoint, not the field in the form.

As I said previously, if you want to search the truncated text in the field, then you can not use the managed property.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 10:00pm


So in order to able to search by field with no limit of character, I will create a multi-line text box. However, I can't use managed property. 

If that is the case, what should I use to perform a search on certain field on all infopath forms in a form library?

Thanks in advance.

September 2nd, 2015 8:22am

Hi wkpli,

The text will not be truncated when using multi-line text box.

You can use managed property for the multi-line column for search.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 9:34pm

Thanks Victoria,

I think we have been having issue when we use a multi-line text box and try to promote the field to the form library, it always gets truncated in the library field  . And that is the reason why I started this post.  Does this happen only in the display view and the full text doesn't exist within that property?

This first image is the actual text box in the infopath form and you can see it is a multi-line text box and with more than 255 characters. While the 2nd image is the form library view, and you can see the text are truncated t0 255 characters.

Image#1 -- multi-line text box in the form

Image #2 -- Form Library

Do you have any idea or suggestion?

Thanks in advance.


  • Edited by wkpli 19 hours 11 minutes ago
September 3rd, 2015 8:29am

Hi wkpli,

As my test, the text will not be truncated when using multi-line text column.

In InfoPath, it is called Rich Text Box.

After publishing to SharePoint, the field is a multi-line text column.

Please go to the Library settings page of the form library to see if the field is a multiple line of text column.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 9:50pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics