Search Results for 'list form'

Home Forums Search Search Results for 'list form'

Viewing 15 results - 1,156 through 1,170 (of 1,358 total)
  • Author
    Search Results
  • Ashwin Raj
    Participant

      I set up a “lookup” list for populating a 3-level cascading dropdown field set. So, I am able to make a selection in field# 1, and field# 2 shows up and is populated with one or more choices. Then, I make a selection in field# 2, and field# 3 shows up and is populated with one or more choices. So this part works nicely.

      The other nice feature is that when any field has only one choice, it is automatically selected. But the anomaly I am encountering is that when any choice is automatically selected in a field, the underlying SharePoint text-field is not populated. Only when I explicitly select a choice in a drop-down, the underlying field is populated with the same value. At first, I didn’t understand what was happening, but when I turned on the debug mode in the script, then I was able to see what was happening. A screenshot of the relevant part of the form is attached. The initialization script is as below:

      
      
      spjs.casc.init({
      	lookupList:"Case Types Lookup",
      	lookupListBaseUrl:L_Menu_BaseUrl,
      	lookupListFields:["Title","Case_x0020_Library","Document_x0020_Type"],
      	thisListFields:["Case_x0020_Type","Case_x0020_Library","Document_x0020_Type"],
      	dropDownDefaultvalue:"",
      	hideEmptyDropdowns:true,
      	autoselectSingleOption:true,
      	clearInvalidSelection:true,
      	debug:true
      });

      How do I get the underlying SharePoint field to have the same value as the auto-selected single option in the corresponding drop down field?

      Thanks,
      Ashwin

      #10657
      Penny Kingston
      Participant

        Alex,
        I am now trying to use the same code on the edit form to save and stay on the edit form. However, using the code above does not work because it tries to create a new item as opposed to saving the existing item. My guess is that I need to modify the newItem line:

        NewItem = spjs.utility.addItem({“listName”:_spPageContextInfo.pageListId,”data”:data});

        I have seen “spjs.utility.addItem” and “spjs.utility.DeleteItem” used in your blogs, do you have a command to edit, save or update an item?
        Thanks!

        #10653
        DCH
        Participant

          Yes, the default form renders without the DFFS_Loader field. I added the field back into the list and now the overlay never quits spinning.

          #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.

            #10627
            Alexander Bautz
            Keymaster

              This error is not from DFFS. Does the form render without this error if you remove the DFFS_Loader field from your list?

              Alexander

              #10594
              Penny Kingston
              Participant

                Hi Alex, I have used your code for saving and redirecting a form using the code below. It works great except that the required field of “SalesID” no longer seems to be required.

                It appears that the code checks the field but there is no alert that forces someone to populate the field. Do you have any suggestions for making the salesID required using this code?

                function GoToEdit(){
                var ok = spjs.dffs.check_Mandatory([“SalesID”]),
                data = {},
                newItem,
                url;
                if(ok){
                data.SalesID = getFieldValue(“SalesID”);
                newItem = spjs.utility.addItem({“listName”:_spPageContextInfo.pageListId,”data”:data});
                if(newItem.success){
                url = location.pathname.substring(0,location.pathname.lastIndexOf(“/”)) + “/EditForm.aspx?ID=”+newItem.id;
                if(GetUrlKeyValue(“IsDlg”)===”1″){
                url += “&IsDlg=1”;
                }
                location.href = url;
                }else{
                alert(newItem.errorText);
                }
                }
                }
                function PreSaveAction(){
                saveAndRedir();
                }

                #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.

                  #10532
                  Alexander Bautz
                  Keymaster

                    This looks strange is the star present if you disable the tooltip?

                    Can you open the dev console (hit F12 > Console) and type in this in both forms (must not be opened in a dialog):

                    spjs.dffs.data.requiredFields

                    This should give you an array of all required fields – are the fields listed here in both browsers?

                    Alexander

                    #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.

                      #10451
                      Bloodlvst
                      Participant

                        Hey everyone,

                        I’ve had success previously with creating a button on my forms which sets a certain field to a value and saves the list item all in one click, which triggers a workflow based on the value.

                        However, I’m wondering if anyone knows of any way where if I have a workflow enabled to be started manually, if a button in a list item can be set to start the workflow on that item?

                        Thanks in advance for any help! 🙂

                        Alexander Bautz
                        Keymaster

                          I got a question about summing the values from another column in a list connected with a multi lookup column. Here is the request:

                          I have a Product list that contains columns for product [Title] and the [Install hours] for that product.

                          On our Orders list I have a look up column where multiple products can be added to an order.

                          Based on the items added to that order, I would like the Install hours (on the products list) to be summed in another field in the orders list.

                          Here is a code example to get you started:

                          function lookupExtraColumnData(){
                          	var a = [], b = [], c = 0;
                          	a.push("<Where>");
                          	a.push("<In>");
                          	a.push("<FieldRef Name='ID' />");
                          	a.push("<Values>");
                          	$("#dffs_LookupFieldName select:last option").each(function(i,o){
                          		b.push("<Value Type='Number'>"+$(o).val()+"</Value>");
                          	});
                          	a.push(b.join(""));
                          	a.push("</Values>");
                          	a.push("</In>");
                          	a.push("</Where>");
                          	if(b.length > 0){
                          		var res = spjs.utility.queryItems({"listName":"ProductListDisplayName","query":a.join(""),"viewFields":["InstallHours"]});
                          		$.each(res.items,function(i,item){
                          			if(item.InstallHours !== null){
                          				c += Number(item.InstallHours);
                          			}
                          		});
                          		// set the value in a field
                          		setFieldValue("SumFieldName",c);
                          	}
                          }

                          Add this function to the custom js textarea in DFFS backend, and call it for example on “save” using the “The form is saved” trigger.

                          You must change “LookupFieldName” for your lookup field name, the “ProductListDisplayName” with the display name or the GUID of the product list, the field name “InstallHours” with the actual field you want to sum, and the “SumFieldName” with the field to write the sum to.

                          Please note that the sum is written to a “static” field in the list item, and will not update on already added items if you update the “InstallHours” field in your products.

                          Hope this can be used as a staring point.

                          Alexander

                          chgrnet
                          Participant

                            Is there a way, in the parent form, to only load the automatically created data in the “_vLookupID” field if a folder has been created? I want to update data in the child list with data from the parent list as the parent list is updated (to show status, etc.) I want to use whether the “_vLookupID” field has data as a driver for this, so the workflow does not throw an error. Also, I think the loading of this data may be causing the form to load slower (I’m not sure of this, but is it possible?).

                            #10275
                            Brett
                            Participant

                              Hi Alexander,

                              Can you please provide the correct syntax to use multiple lookup columns on a form?
                              I’ve tried different variations, drop-downs are showing but no values are provided.
                              The single drop-down value for “CompanyName” worked perfectly.

                              This is an example of what I’ve tried
                              “fieldToConvertToDropdown”:[“CompanyName”,”PositionTitle”],
                              “listName”:”Tasks”,
                              “listBaseUrl”:”/Sites/MySite”,
                              “optTextFieldInternalName”:”CompanyName”,”Position”,
                              “sortFieldName”:”CompanyName”,”Position”,

                              The error I’m receiveing:
                              [LookupInTextField: Debug]
                              1.11
                              ListName: Tasks
                              Query: <Where><IsNotNull><FieldRef Name=’CompanyName,Position’ /></IsNotNull></Where><OrderBy><FieldRef Name=’CompanyName,Position’ Ascending=’TRUE’/></OrderBy>
                              ViewFields: ID,CompanyName,Position
                              Query returned -1 items.

                              Thanks for your help.

                              #10266
                              Paul Federwitz
                              Participant

                                SharePoint 2013 has a great feature where you can display different renditions of the same image. I have a list where each item has an “Item Icon”, an image to represent it. For most places where this icon is used I need a very small rendition, 100×100 px.

                                However, when a user clicks on the list item to view it, I would like them to see a larger version. What I need help with is a way to make the display form to show a larger rendition (only the display form, the edit and new forms can use the default rendition).

                                Currently the image that is displayed is this:
                                https://Contoso.sharepoint.com/Photo%20Library/image.jpg?RenditionID=5

                                I need to change it to this:
                                https://Contoso.sharepoint.com/Photo%20Library/image.jpg?RenditionID=6

                                Here is the information about the field:
                                Display Name: Item Icon
                                Internal Name: Item_x0020_Icon
                                Field Type: SPFieldImage

                                Note that this type of field stores the information as “LinkTitle,LinkURL”. In my case it is stored as “Item Icon,https://Contoso.sharepoint.com/Photo%20Library/image.jpg?RenditionID=5&#8221;. When I try to put the field name into the HTML section like this “Item_x0020_Icon” it simply displays “Item Icon” on the form.

                                Any help would be appreciated. I am not all that great with JavaScript, just enough to see what is going on and make a few modifications. Here is an article on how somebody did this with a Content Search Web Part, I just haven’t figured out how to apply it to DFFS.
                                https://www.martinhatch.com/2013/08/customising-content-search-web-part.html

                                #10214

                                In reply to: Multiple lines of text

                                Alexander Bautz
                                Keymaster

                                  Hi,
                                  If you are on SP 2013 you must change this field to the “Advanced Rich text” format (in list settings > Edit field) – this old control is not supported in DFFS.

                                  Alexander

                                Viewing 15 results - 1,156 through 1,170 (of 1,358 total)