DFFS & External Lists SharePoint 2010

Home Forums General discussion DFFS & External Lists SharePoint 2010

Viewing 18 reply threads
  • Author
    Posts
    • #10486
      Harley Malamut
      Participant

        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.

      • #10530
        Alexander Bautz
        Keymaster

          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-types

          Alexander

        • #10540
          Harley Malamut
          Participant

            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.

          • #10549
            Alexander Bautz
            Keymaster

              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

            • #10551
              Harley Malamut
              Participant

                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.

              • #10608
                Alexander Bautz
                Keymaster

                  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

                • #10645
                  Harley Malamut
                  Participant

                    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.

                  • #10647
                    Alexander Bautz
                    Keymaster

                      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

                    • #10649
                      Harley Malamut
                      Participant

                        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.

                      • #10677
                        Alexander Bautz
                        Keymaster

                          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

                        • #10730
                          Harley Malamut
                          Participant

                            Hi Alexander,

                            Pardon my ignorance, but where would I put that line of code?

                            Harley

                          • #10736
                            Harley Malamut
                            Participant

                              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

                            • #10739
                              Alexander Bautz
                              Keymaster

                                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

                              • #10899
                                Harley Malamut
                                Participant

                                  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

                                • #11097
                                  Harley Malamut
                                  Participant

                                    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

                                  • #11130
                                    Alexander Bautz
                                    Keymaster

                                      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

                                    • #11138
                                      Harley Malamut
                                      Participant

                                        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

                                      • #11148
                                        Alexander Bautz
                                        Keymaster

                                          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

                                        • #11203
                                          Harley Malamut
                                          Participant

                                            Will do!

                                            Thanks Again…

                                            Harley

                                        Viewing 18 reply threads
                                        • You must be logged in to reply to this topic.