Search Results for 'list form'

Home Forums Search Search Results for 'list form'

Viewing 15 results - 1,216 through 1,230 (of 1,358 total)
  • Author
    Search Results
  • Ian Patrick
    Participant

      Hi Alexander, thank you for the rapid response. The issue appears to have resolved itself. I recreated the NewForm itself from another list and edited the ListIDs put the CEWPs back in and it started working. I guess there was some problem with the NewForm I had that I couldn’t see any issue with the CEWPs and used the same ones as on the previous NewForm. Thank you very much for your response…. By the way I love the new functionality in this version. I’ll send you another beer.. or 2
      Kind regards

      Ian

      Ian Patrick
      Participant

        Hi Alexander,
        I’ve started to get the DFFS ‘Missing ID’ error as above on the New Form in my list since loading a new DFFS version published Oct 06 2015 04:01:58pm (Frontend V4.357, CSS 4.10, JQuery 1.11.3, SPJS-Utilities 1.252). It is for a list not a library as above. The Edit form works fine on this list. I’ve tried deleting the configuration for the Newform and I’ve cleared out the browser cache as suggested above. Also, this version works fine on other Newforms on other lists. Any help greatly appreciated.
        Kind regards

        Ian

        #8695
        Alexander Bautz
        Keymaster

          This should do the trick:

          function checkLookupFieldValue(){
          	var data, lookupValue, currValue = getFieldValue("EditFormInput"), a = 0, b;
          	data = spjs.utility.getItemByID({"listName":_spPageContextInfo.pageListId,"id":spjs.dffs.data.thisItemID,"viewFields":["LookupExtraFieldInternalName"]});
          	lookupValue = data["LookupExtraFieldInternalName"]; 
          	if(lookupValue !== null){
          		$.each(lookupValue.split(";#"),function(i,s){
          			if(i % 2 !== 0){
          				if(a === 0 || parseInt(s,10) < a){
          					a = parseInt(s,10);
          				}
          			}
          		});
          		b = parseInt(currValue,10);
          		return a < b;
          	}
          }

          Please change “LookupExtraFieldInternalName” and “EditFormInput” to your own field names.

          Let me know if this works.

          Alexander

          #8693
          DougMcCourt
          Participant

            Hi Alexander – It works – but I neglected a piece of information, the derivation of the LookupExtraFieldInternalName is based on a multiselect – so there can be multiple different values in the result returned into the lookupValue array. I need to choose the smallest value – so I tried putting in lookupValue.Sort() thinking it would percolate the smallest value up to the top of the list. Instead – I got the dreaded “This took Forever!” – and it didn’t work. (Note – it DOES work properly if there is only one item in the LookupExtraFieldInternalName.) note2: The possible values are: 4 – Exec Oversight; 3 – Management; 2 – Program; or 1 – Workstream / Team.

            Alexander Bautz
            Keymaster

              Hi,
              This code example will pull the date from a field named “Birthday”, and write it to a field named “Age”. Please note that this will be a static value, and will not automatically tick up a notch next year without you editing the list item.

              Put this in the Custom JS:

              function calculateAge(){
              	var dfo, sDate, now, age;
              	dfo = spjs.dffs.getRegionalSettings().DateFormat;
              	sDate = spjs.dffs.strToDateObj("Birthday",dfo);
              	now = new Date();
              	age = now.getFullYear() - sDate.getFullYear();
              	if(now.getMonth() < sDate.getMonth()){
              		age -= 1;
              	}else if(now.getMonth() === sDate.getMonth()){
              		if(now.getDate() < sDate.getDate()){
              			age -= 1;
              		}
              	}
              	setFieldValue("Age",age);
              }

              Then call this function from a rule in DFFS by putting the function name in the “Run these functions / trigger these rules” field.

              Let me know how it works out.

              Alexander

              #8689
              AdamP
              Participant

                I realise that for lists it’s not possible to create vlookup associations without the extra column workaround due to the item ID not yet being created, but does this logic also carry though for document libraries?
                At the point the form loads (editform, not newform as in the case of a list), the ID of the new document is accessible in the form of;

                http://site/library/Forms/EditForm.aspx?Mode=Upload&CheckInComment=&ID=18&RootFolder=Folder&Source=http%3A%2F%2Fsite%2Flibrary

                Is it possible to enable vlookup for editform with mode=upload even though it is a “new” item?

                Adam

                #8688
                Robert Sawyer
                Participant

                  Hi Alexandar,

                  First of all, you have a great toolkit!
                  I’m excited to investigate your latest feature to allow the creation of an item in the vLookup on the new form!

                  My question, do you have the ability to create a new item in the vLookup based upon an item that already listed within the vLookup? i.e Allow the user to select an existing item in the vLookup and create a new item where the columns are automactically copied to the new item. Or, open a dialog box of the items within vLookup and allow the selection of an item from which the columns are copied to a new item?

                  I hope this makes sense, please message me if you require more clarity or information?

                  Regards

                  Rob

                  #8680
                  Ryan Cornfoot
                  Participant

                    *Request Headers*

                    Accept:application/xml, text/xml, */*; q=0.01
                    Accept-Encoding:gzip, deflate
                    Accept-Language:en-GB,en-US;q=0.8,en;q=0.6
                    Connection:keep-alive
                    Content-Length:1080
                    Content-Type:text/xml; charset=UTF-8
                    Cookie:_ga=GA1.2.140540675.1424861500; Ribbon.ListForm.Edit=632492|-1|328|-800423560; WSS_KeepSessionAuthenticated={9e742d76-c8cb-4594-a749-f80bafb31eca}
                    Host:ameyportal.ameygroup.int
                    Origin:http://MYSERVER
                    Referer:http://MYSERVER/sites/travel/Lists/Travel%20Requests/NewForm.aspx?RootFolder=&IsDlg=1
                    User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
                    X-Requested-With:XMLHttpRequest

                    *Response Headers*

                    Cache-Control:private
                    Content-Length:711
                    Content-Type:text/xml; charset=utf-8
                    Date:Fri, 09 Oct 2015 13:11:46 GMT
                    MicrosoftSharePointTeamServices:14.0.0.6115
                    Server:Microsoft-IIS/7.5
                    X-AspNet-Version:2.0.50727
                    X-MS-InvokeApp:1; RequireReadOnly
                    X-Powered-By:ASP.NET

                    *SPJS Version*
                    1.252

                    #8678
                    Alexander Bautz
                    Keymaster

                      Hi,
                      This will also require a custom function. Create a rule with trigger “Custom JavaScript function”, and add this to the “This value” field: “compareLookupFieldValue”. Then add this to the Custom JS section:

                      function compareLookupFieldValue(){
                      	var data = spjs.utility.getItemByID({"listName":_spPageContextInfo.pageListId,"id":spjs.dffs.data.thisItemID,"viewFields":["LookupExtraFieldInternalName"]}), lookupValue = data["LookupExtraFieldInternalName"], currValue = getFieldValue("EditFormInput"), a, b;
                      	if(lookupValue !== null){
                      		a = parseInt(lookupValue.split(";#")[1],10);
                      		b = parseInt(currValue,10);
                      		return a < b;
                      	}else{
                      		return false;
                      	}
                      }

                      Please change “LookupExtraFieldInternalName” and “EditFormInput” to your own field names.

                      Let me know how this works out.

                      Alexander

                      • This reply was modified 9 years, 7 months ago by Alexander Bautz. Reason: fixed typo
                      #8672
                      DougMcCourt
                      Participant

                        Has anyone come up with a way to use a field value from a ‘parent’ DispForm in the rule set for a EditForm?

                        Im thinking of approaching by requiring the edit form to be a dialog from the Dispform
                        so am wondering if there is syntax to use in a rule based on a field in the Editform, and compare it to a field value in the parent “Dispform” (note: the field in the DispForm is a supplemental value associated with a Lookup to another list) My goal is to have a rule like

                        If {EditformField} greater than or equal to {ParentDispForm.{parentdispfield} then the rule fires.

                        Has anyone successfully done this?

                        #8670
                        DougMcCourt
                        Participant

                          Im trying set a rule for Editform for a list (On Save) that will set the value of a text field to the concatenation of {fielda}-{ID}. My permutation is I would like the result to be like X-0005, where value in ID is masked with leading zeros in the new field.

                          I though about setting a rule where if {ID} < 10 have the rule set the value as {Fielda}-000{ID} and another rule if {ID} < 100 and so forth. Unfortunately, cant seem to figure out how to trigger a rule based on the value of {ID}. Anyone run in to this, or have any good idea? (I even tried to anticipate Alexanders’ cleverness by trying {Fielda}-{ID[0000]} like the way {timestamp} works!)

                          #8645
                          JGMcLoughlin
                          Participant

                            Is it possible to use DFFS forms in a mobile view, i.e. on a smartphone or tablet that isn’t using the full resolution browser?

                            I have a list that is using DFFS. It displays fine on my PC browser of course, as well as on my iPhone when Safari is showing the PC view of the list. However, when I switch to the mobile view I lose all that lovely DFFS functionality, AND the “hidden” SPJSBlog.com field is visible!!

                            Hope you can help as I really don’t want to be learning a new skill this week!

                            John

                            #8619

                            In reply to: Workflow Help

                            Alexander Bautz
                            Keymaster

                              Hi,
                              The value in the _vLookupID column is generated by the vLookup script so you cannot use this directly. You can however build this in the WF as the “ID” can be any unique string.

                              The format can be all alphanumeric characters, and must have this format:

                              xx:xx

                              The length of the parts left and right of the colon is not important, but you must ensure this “ID” will be unique within the list.

                              Hope this helps,
                              Alexander

                              #8618
                              Charlie Bell
                              Participant

                                So i have setup vLookup to work with DFFS and new form using the _vLookup columns for adding new items to a RMA form when creating new that works great but i also have a Form on our website that gets submitted to a List then i run a workflow to create a new rma item and this workflow also creates equipment in a lookup list.

                                I was going to use your _vlookupID and_vLookPartentID but i see that this column does not get populated when i create item with a workflow is there anyway to do this?

                                Alexander Bautz
                                Keymaster

                                  This code example shows how you can display more information on predecessors in DispForm of a task. By default, only the “Title” field is shown, and as the predecessors are selected from a regular lookup column vLookup cannot be used to show more information.

                                  This code will work for SharePoint 2010 and 2013.

                                  Add this code to the Custom JS textarea:

                                  function showPredesessors(){
                                  	var listTitle = "Tasks", pArr = spjs.dffs.beforeProperties.Predecessors, qb = [], cc, q, list, items, res = [];
                                  	if(pArr.length === 0){
                                  		$("#PutPredecessorsHere").html("No items found");
                                  		return;
                                  	}
                                  	cc = new SP.ClientContext.get_current();
                                  	list = cc.get_web().get_lists().getByTitle(listTitle);
                                  	qb.push("<View Scope='RecursiveAll'><Query>");
                                  	qb.push("<Where>");
                                  		qb.push("<In>");
                                  			qb.push("<FieldRef Name='Title' />");
                                  			qb.push("<Values>");
                                  				$.each(pArr,function(i,t){
                                  					qb.push("<Value Type='Text'>"+t+"</Value>");
                                  				});
                                  			qb.push("</Values>");
                                  		qb.push("</In>");
                                  	qb.push("</Where>");	
                                  	qb.push("</Query></View>");
                                  	q = new SP.CamlQuery();
                                  	q.set_viewXml(qb.join(''));
                                  	items = list.getItems(q);
                                  	cc.load(items);
                                  	cc.executeQueryAsync(
                                  		function(sender, args){
                                  			var e = items.getEnumerator();
                                  			res.push("<table cellpadding='2' cellspacing='0'>");
                                  			res.push("<tr>");
                                  			res.push("<th valign='top'>Title</th>");
                                  			res.push("<th valign='top'>% Complete</th>");
                                  			res.push("</tr>");
                                  			while(e.moveNext()){
                                  				item = e.get_current();
                                  				res.push("<tr>");
                                  				res.push("<td valign='top'>"+item.get_item("Title")+"</td>");
                                  				res.push("<td valign='top'>"+(item.get_item("PercentComplete") !== null ? (item.get_item("PercentComplete") * 100) + " %" : "")+"</td>");
                                  				res.push("</tr>");					
                                  			}
                                  			res.push("</table>");
                                  			$("#PutPredecessorsHere").html(res.join(""));
                                  		},
                                  		function(sender, args){
                                  			alert(args.get_message());
                                  		}
                                  	);
                                  }

                                  Then add this code to a “HTML” area in a tab:

                                  <div id="PutPredecessorsHere"></div>

                                  Last step is to add a rule with trigger “Selected tab index” equals the tab index you put the div tag in the previous step. This rule must have the name of the function “showPredesessors” in the “Run these functions / trigger these rules” field.

                                  You will now have a basic table with information on “Title” and “% Complete” for all the predecessors of the current task.

                                  Please note that this code is a basic example, and you will have to use this code as a starting point for your own customization.

                                  Alexander

                                  • This topic was modified 9 years, 7 months ago by Alexander Bautz. Reason: Fixed an error in the code example
                                Viewing 15 results - 1,216 through 1,230 (of 1,358 total)