Home › Forums › General discussion › DFFS & External Lists SharePoint 2010
Tagged: SharePoint 2010 External Lists
- This topic has 18 replies, 2 voices, and was last updated 8 years, 8 months ago by Harley Malamut.
-
AuthorPosts
-
-
February 29, 2016 at 16:49 #10486
I have a site with an External List. The External List connects to a table on a MS SQL server. The table has a handful of columns that need to store hundreds and in some instances thousands of characters of data. The fields are used to store progress notes.
After configuring DFFS on the forms for this list, all of the varchar, nvarchar and text columns in the SQL table, regardless of their length, display as a single line of text on the forms. I would like to configure some of the fields on the forms to be multi-line but can’t seem to find any settings in DFFS to do so.
If DFFS can’t support forcing a field on an external list to display as multi-line, then is there a way to add a “temporary” field to the form that will show as multi-line. If that can be done, I figure that I could use a rule to move the data in the temporary field to the column on the external list when the form is being closed.
-
March 2, 2016 at 00:03 #10530
Hi,
I don’t have much experience using external lists, but could this post help: http://sharepoint.stackexchange.com/questions/158441/multi-line-text-box-for-external-content-typesAlexander
-
March 2, 2016 at 15:44 #10540
Hi Alexander,
I found that post last week. I added a “text” column to the SQL table, created a new External Connection, and then created a new External list. The “text” column still shows as a single line when you put the record in edit mode. We are running SharePoint 2010. Perhaps this is fixed in SharePoint 2013.
I just created a 2nd list, but used InfoPath for the forms and was able to configure the “text” columns as multiline. However I would prefer to use DFFS for this project.
So to try that other approach that I mentioned in my post, I added a HTML Section to a tab on a form for a regular SharePoint list. The HTML Section adds a multiline text area to the tab. And I created some java script to take the contents of that text area and copy it to one of the other single line text fields when the record is being saved.
It works with a standard SharePoint list field. Next step is to test it against an external list.
-
March 2, 2016 at 22:03 #10549
Can you add a screenshot of how the field looks like in your form? – also include a screenshot of the HTML code of the field (right click the field and select “Inspect”).
Alexander
-
March 2, 2016 at 22:38 #10551
Attached the screen shots for the text area that you requested.
I created a new external list and used the same HTML Section and JavaScript from the standard SharePoint list. The JavaScript code is able to retrieve the text from the text area, but it can’t set the contents of the text column in the SQL table. It works fine when it runs on a regular SharePoint list. It is able to take the text out of the text area and insert it into the SharePoint List column.
Right now I am wondering if this is a limitation of BDC.
Attachments:
-
March 4, 2016 at 08:37 #10608
I’m not sure I understand. Which field is the one you want to change to a multiline? – could you show me the HTML for this one?
I did a quick search and it seems you are right about this being a limitation in the BDC functionality.
Alexander
-
March 7, 2016 at 17:23 #10645
I hope this will clear up any confusion.
The field that I wanted to change to multiline was one of the fields in the SQL table. No matter what format I used for the field in the SQL table – nvarchar, varchar, text, that field would only show as a single line of text in SharePoint.
So as a workaround, I added a textarea field to the form using your product. I used a HTML Section to add a table and the text area field within that table to a tab. I attached the screen shots of this in a previous post.
What I was trying to do was to present users with a multiple line textarea field to enter their data into. This would be a substitute for the single line text fields that SharePoint provides.
And when the user would save the record, custom javascript that I wrote would take the contents of the textarea field and place that data in the field in the SQL table.
The textarea field works fine. I can enter a lot of text into it. The javascript code is unable to set the value of the field on the SQL table using the text from the textarea. The code works if I use a regular SharePoint field, but fails to set the field if it is on a SQL table.
So right now it is looking more and more like this is a limitation of BDC.
I also created a form for the list using InfoPath and it looks like that product allows you to set the field to multiline regardless of the limitations that BDC places on the standard SharePoint form. I would rather not use InfoPath, but to get around this limitation, it looks like I have no other choice.
-
March 7, 2016 at 17:55 #10647
Hi,
From your “TextAreaScreenShot-t.pdf” – above – is this a screenshot of the actual HTML for the BDC connected SQL field, or is this the textarea you inserted? – I suspect it is the field you added, and I need to see the same type of screenshot showing the HTML for the single line of text column.Alexander
-
March 7, 2016 at 18:14 #10649
TextAreaScreenShot-t.pdf – Yes it is a screenshot of the actual HTML that I added to the form using DFFS.
Just uploaded a screen shot from the SQL field. There are no modifications to that field.
Attachments:
-
March 8, 2016 at 17:50 #10677
Hi,
If you look at the field, it has a maxLength of 255 characters. I’m not sure this will work, but you can try removing this attribute like this:$("#dffs_Title").find("input").removeAttr("maxlength");
No guarantee this will have any effect though.
Forgot to write that this example is for the “Title” field – change “Title” with the internal name of your field.
Alexander
- This reply was modified 8 years, 9 months ago by Alexander Bautz.
-
March 11, 2016 at 15:33 #10730
Hi Alexander,
Pardon my ignorance, but where would I put that line of code?
Harley
-
March 11, 2016 at 20:55 #10736
Hi Alexander,
And it looks like there are issues with creating multiple tabs for an external list. Do you want me to post that as a separate issue or add it to this one?
Harley
-
March 11, 2016 at 22:22 #10739
Yes, create a new topic so it’s easier to find it when someone searches.
Would it be possible for me to log into your site to see this for myself? – of so, could you email me the login details, and a link to the list?
Best regards,
Alexander -
March 24, 2016 at 18:55 #10899
Hi Alexander,
Sorry, I was out of the office for more than a week!
Due to security issues I can’t have you log into our site. I will look into seeing if I can get permission to do a web-ex with you.
I will also record that other issue related to not being able to set up multiple tabs using DFFS for an external list in a separate thread.
Thanks,
Harley
-
April 13, 2016 at 21:49 #11097
Hi Alexander,
I was told that I can set up a webex to be able to do a screen share session with you. Will you be available to do this sometime next week?
Thanks,
Harley
-
April 14, 2016 at 17:33 #11130
Hi,
I’m not sure I can do any difference when it comes to the appearance / functionality of the external data column. From what I can find by searching the Internet It seems this is a known issue – and if changing the type in the SQL data table to text did not help, I don’t know what to do. Maybe someone else reading this can help?Is it an option to move the data into SharePoint?
Best regards,
Alexander -
April 15, 2016 at 16:40 #11138
Hi Alexander,
That seems to be in line with what I found while researching this issue.
I guess my fall back plan is to use InfoPath for forms that need to display text and varchar SQL columns as multi-line.
I’ll try to post a new entry for that other issue with the tabs when the list is based on a SQL table sometime next week.
Thanks for looking into this for me!
Harley
-
April 16, 2016 at 08:59 #11148
I’m sorry I cannot be of more help here. I simply haven’t had the time to set up an external list to test with. I might need to use Azure as I don’t have any local servers.
I’ll see what I can do, but in the meantime, please post any new information you might find, and maybe someone else can help?
Best regards,
Alexander -
April 20, 2016 at 19:04 #11203
Will do!
Thanks Again…
Harley
-
-
AuthorPosts
- You must be logged in to reply to this topic.