Search Results for 'list form'

Home Forums Search Search Results for 'list form'

Viewing 15 results - 1,231 through 1,245 (of 1,358 total)
  • Author
    Search Results
  • #8594
    Ryan Cornfoot
    Participant

      Hi, Im hoping someone can help.

      I have used DFFS on multiple 2007 sites in the past, this is the first time implementing into a large list in 2010.

      My issue is that there seems to be a problem with one of my rules that causes navigation of the form and its tabs to be incredibly slow. If I turn off all rules it speeds up again, also if I use Google Chrome to access the newform.aspx I have zero issues, its as fast as ever.

      There are no errors, just slowness, the offending rule is quite simple, based on a checkbox it unhides a tab and makes around 20 fields mandatory.

      Thanks in advance

      #8557
      Alexander Bautz
      Keymaster

        Or if what you meant was to link to a NewForm with tab specified:

        /DFFS/Lists/DFFS_CEWP/NewEditForm.aspx?sTab=2

        Alexander

        #8521
        Alexander Bautz
        Keymaster

          Sorry for the delay – it seems I’m not getting all the notifications from my forum.

          I have a list “Customers” with the customer name in the Title field, and a field “ServiceContract” that may contain the text “PO Required”.

          Then I have a lookup form my DFFS enabled form into the “Customers” list in the Title field – pulling in the customer name.

          Then I have this rule in DFFS NewForm: Customer is changed > Run these functions = customerChanged (see attached image).

          In the custom js tab, I have this code:

          function customerChanged(){
          	var sVal = $("#dffs_Customer").find("option:selected").val(), res;
          	res = spjs_getItemByID({"listName":"Customers","id":sVal,"viewFields":["ServiceContract"]});
          	if(res !== null){
          		if(res.ServiceContract === "PO Required"){
          			spjs.dffs.dlgBox("This customer requires a PO.",true);
          		}
          	}
          }

          Change “Customer”, “Customers” and “ServiceContract” to match your field and list name.

          Please note that this code example uses “spjs.dffs.dlgBox” added in v4.350 – change this to an “alert(…)” if you use another version.

          Hope this helps,
          Alexander

          Attachments:
          #8519
          Alexander Bautz
          Keymaster

            Hi,
            You can link to a tab like this:

            /DFFS/Lists/DFFS_CEWP/EditForm.aspx?ID=123&sTab=2

            This will select the third tab as it is 0-based.

            Alexander

            AdamP
            Participant

              I’ve previously only used DFFS with lists rather than libraries, and have just run into a problem the first time I’ve loaded it into a library – I’m not sure if I’m doing something wrong or if libraries aren’t fully supported.

              Everything works as expected on a plain old editform.aspx, so when editing an existing item in the library DFFS loads and runs normally.

              Obviously there is no newform.aspx on a library, so new items are added via an upload.aspx, followed by an editform.aspx to complete the metadata. When I apply DFFS to the editform.aspx and upload a new file I get the error “Missing ID parameter for the list item in the URL” at the point where DFFS loads on editform.aspx – it fails leaving editform completely unmodified.
              It looks as though there is an ID for the item in the URL, but DFFS is failing to see it.

              Upload url (DFFS error) – http://Site/Library/Forms/EditForm.aspx?Mode=Upload&CheckInComment=&ID=8&RootFolder=%2FSite%2FLibrary&Source=http%3A%2F%2FSite%2FLibrary%2FForms%2FAllItems%2Easpx

              Edit url (DFFS works normally) – http://Site/Library/Forms/EditForm.aspx?ID=8&Source=http%3A%2F%2FSite%2FLibrary%2FForms%2FAllItems%2Easpx&RootFolder=%2FSite%2FLibrary&ContentTypeId=0x010100964301C572AE224F84A7DC4914E4A5DE

              Can anyone offer any ideas as to whether this should work, and if so, what the problem might be?

              DFFS frontend 4.350
              DFFS backend 4.350
              SPJS-utility 1.25
              Jquery 1.11.3

              Thanks

              Adam

              #8498
              Charlie Bell
              Participant

                My situation is i have a cases list and on creating new cases a user will select a customer with drop down. Based on Value customer selected it should read a column in customer list called Service Contract if the value of this column is PO Required then show a notification that says Please note this customer requires a PO to save ticket.

                SO i have my main list Cases with a lookup called Customers

                I have Customers list which holds the column Service Contract this is a choice field

                Ideally i would love to make the PO filed on cases required if this is true and message is displayed not sure if that would be possible.

                Any help in the right direction to accomplish this would be great.. thanks..

                #8485
                Ian Patrick
                Participant

                  Hi Alexanda,

                  Just using the new release v4.350|CSS version: 4.10 / 4.10|spjs-utility version: 1.25, and I’ve hit an issue with SPFieldMultiChoice fields. These display ok when they are Editable but when I make them read only the choice names disappear and they display like (see attachment). I’ve tried the form in an older version and the multichoice field works fine, it lists the selected items separated by commas.

                  Kind regards

                  Ian

                  Attachments:
                  #8484
                  Gerard Graham
                  Participant

                    Hi there

                    Yes, there are multiple lines per employee in the list. I’d be filtering for a single project and summing employee hours for all outputs for that project.

                    As for Javascript knowledge – nil.

                    I can pull a spreadsheet for the list and use a pivot table to get the information I need so I do have a way, but in the vlookup would be better.

                    Thanks

                    Gerry

                    #8481
                    Alexander Bautz
                    Keymaster

                      Hi,
                      Are there more than one “line” in the list for each employee?

                      I’ll consider adding grouping in multiple levels, but this is a bit tricky. You might have to use a custom function to create the output you like. If you have the necessary JavaScript knowledge, you might be able to use the data object returned from vLookup in a custom function? – look here for information: https://spjsblog.com/vlookup-for-sharepoint/vlookup-user-manual/#Accessing_the_vLookup_data_object

                      Alexander

                      #8465
                      nils.enhoerning
                      Participant

                        Hi,

                        I am writing a lot of JavaScript, often interacting with the dffs forms when I have a requirement that the rules functions cannot handle yet. Sometimes these requests involve running queries on form load to see if, for instance, an item exists for the current user and this category (where category is a choice field or a lookup). To then read the value I use something like

                        $(“select[title~=’Category’] option:selected”).text();

                        The problem is that if I use document $(document).ready(function(){//code here}); it will fire before DFFS has prepared all the columns, or in parallel to it. And I prefer not to use a timeout to resolve this 🙂

                        To trigger this reliably it would be great if there is an equivalent to $(document).ready but something along the lines of $(dffs).ready 🙂

                        Is there such an event being fired when the form is loaded that I can tap into from javascript? As there is a form rule for it I suspect there is some status I can use.

                        #8359
                        jstadick
                        Participant

                          In using the lookup function, I had the need to filter the dropdown by the current user. After the gracious help of Alexander, below was the solution.

                          Hope it helps anyone else with a similar need.

                          Problem: Need to display a list of facilities for the user to select from, but limit the list to only those they have access to.

                          Solution: Use the SPJS-Lookup function and filter based on the current user:

                          Detail:
                          Field on the form being converted to the function: Facility
                          I have a custom sharepoint list called UserAccess with two fields:
                          Facility (Single Line Text)
                          User (People Picker)

                          We used a custom CAML statement to filter the list based on the current user.

                          Below was the function call. Also, I was using this with DFFS tabs, so the code was placed in the Custom JS box in the Misc Tab of the DFFS setup. The real magic is the CAML query.

                          spjs.lookup.init({
                          	"fieldToConvertToDropdown":["Facility"],	
                          	"listName":"UserAccess",
                          	"listBaseUrl":"/sites/Root/Evergreen/crm",
                          	"optTextFieldInternalName":"FacilityID",
                          	"sortFieldName":"FacilityID",
                          	"filterObj":{
                          		"on":true,
                          		"folder":"", // Leave empty to search in all folders
                          		"CAML":"<Where><Eq><FieldRef Name='User' /><Value Type='Integer'><UserID /></Value></Eq></Where>",
                          		"fin":"",
                          		"isLookup":false,
                          		"operator":"Eq",
                          		"filterVal":""
                          	},
                          	"dropDownDefaultvalue":"",
                          	"addYouOwnValue":{
                          		"on":false,
                          		"linkText":"Write your own value"
                          	},
                          	"addToExternalList":{
                          		"on":false,
                          		"customFunction":null, // Function name as a string. If a function name is supplied, this will be used in stead of the default function. The function will be passed the argument object as a parameter.
                          		"linkText":"Add new item",
                          		"saveNewItemText":"Save new item"
                          	},
                          	"debug":false
                          });
                          • This topic was modified 9 years, 8 months ago by Alexander Bautz. Reason: Wrapped the snippet in code tags
                          #8356

                          In reply to: New DFFS Version

                          David S Kaimann
                          Participant

                            I think I found the issue – and – I’m hoping you can help… 😉

                            But first, here’s another issue:

                            • On the “vLookup_frontend” file, there was a rule / function for “SPFieldLookupMulti” that I think got broken with one of the recent updates (even before the BETA).
                            • Can you confirm if the non-Minified code has this information for that rule / function?
                            
                            
                            			case 'SPFieldLookupMulti':
                            				thisField.find('select').val(lId);
                            				thisField.find('select option[value="'+lId+'"]').trigger("dblclick");
                            			break;

                            For my original issue:

                            • On each “tab”, I have “Instructions” (a “Heading or HTML field” I added to the tab) that are hidden / unhidden with another piece of simple JavaScript.
                            • I think that’s what’s causing the funky display, because it worked fine on a list that didn’t have these instructions.
                            • The actual show / hide function is actually working just fine, it just seems to be adding additional versions of the first “column” I have listed on the DispForm / EditForm / New Form.

                            Below is the code that I use:

                            Instructions Example

                            
                            
                            <tr>
                            	<td>Instructions</td>
                            	<td>
                            		<div class="InstructionHeadOpened">
                            			<a class="showLink" href="#" id="instructions1-show" name="instructions1-show" onclick="showHide('instructions1');return false;">Show Instructions <img alt="help" src="/_layouts/images/hhelp.gif" title="Show Help Instructions."></a>
                            		</div>
                            		<div id="instructions1" class="more" style="color:black">
                            			<a class="hideLink" href="#" id="instructions1-hide" name="instructions1-hide" onclick="showHide('instructions1');return false;">Hide Instructions <img alt="help" src="/_layouts/images/crit_16.gif" title="Close Help Instructions."></a>
                            			<p>To create a <strong>new</strong> request:</p>
                            		</div>
                            	</td>
                            </tr>

                            Javascript

                            
                            
                            function showHide(shID) {
                               if (document.getElementById(shID)) {
                                  if (document.getElementById(shID+'-show').style.display != 'none') {
                                     document.getElementById(shID+'-show').style.display = 'none';
                                     document.getElementById(shID).style.display = 'inline';
                                  }
                                  else {
                                     document.getElementById(shID+'-show').style.display = 'inline';
                                     document.getElementById(shID).style.display = 'none';
                                  }
                               }
                            }

                            CSS

                            
                            
                            /* This CSS is used for the Show/Hide functionality. */
                            .more {display: none;font-size: 8pt;}
                            a.showLink {text-decoration: none;display:inline;font-style: italic;font-weight:normal;font-size: 8pt;}
                            a.showLink:hover {text-decoration: none;display:inline;}
                            a.hideLink {text-decoration:none;display:inline;font-style: italic;font-weight:normal;font-size: 8pt;}
                            a.hideLink:hover {text-decoration:none;display:inline;}
                            a.showLinkText {text-decoration: none;}
                            a.showLinkText:hover {text-decoration: none;}
                            a.hideLinkText {text-decoration: none;}
                            a.hideLinkText:hover {text-decoration: none;}
                            div.InstructionHeadOpened{
                            	display:inline;
                            }
                            #8352
                            Kristoffer Bertsch
                            Participant

                              So..I’m not having any luck. I am getting an error..something to do with the “split”
                              SCRIPT5007: Unable to get value of the property ‘split’: object is null or undefined
                              EditForm.aspx?ID=65&IsDlg=1, line 1 character 1

                              This is what my HTML field looks like:
                              <h2>WeightedDocumentVolume: <span class=”WeightedDocumentVolume” /></h2>

                              This is my JS:
                              var qRes = spjs.utility.getItemByID(
                              {
                              “listName”:_spPageContextInfo.pageListId,
                              “id”:spjs.dffs.data.thisItemID,
                              “viewFields”:[“WeightedDocumentVolume”]
                              }
                              );
                              $(“span.WeightedDocumentVolume”).html(qRes[“WeightedDocumentVolume”].split(“;#”)[1]);

                              I appreciate the help!

                              #8329
                              Kristoffer Bertsch
                              Participant

                                So..I’m not having any luck. I am getting an error..something to do with the “split”
                                SCRIPT5007: Unable to get value of the property ‘split’: object is null or undefined
                                EditForm.aspx?ID=65&IsDlg=1, line 1 character 1

                                This is what my HTML field looks like:
                                <h2>WeightedDocumentVolume: <span class=”WeightedDocumentVolume” /></h2>

                                This is my JS:
                                var qRes = spjs.utility.getItemByID(
                                {
                                “listName”:_spPageContextInfo.pageListId,
                                “id”:spjs.dffs.data.thisItemID,
                                “viewFields”:[“WeightedDocumentVolume”]
                                }
                                );
                                $(“span.WeightedDocumentVolume”).html(qRes[“WeightedDocumentVolume”].split(“;#”)[1]);

                                I appreciate the help!

                                #8327
                                Gerard Graham
                                Participant

                                  Hi there

                                  No need to apologise. I will buy you a beer if you can fix this one. Promise!

                                  I’ve attached the screen shot (have rather a lot of fields in this list)

                                  The screen shot shows the Field Type as as Text in the configuration form. If I change to Lookup (Text value) I go no matching records, but also no error.

                                  Thanks

                                  Gerry

                                Viewing 15 results - 1,231 through 1,245 (of 1,358 total)