Forum Replies Created
-
AuthorPosts
-
Thanks for the tip, I’ll look into it.
It probably is time to schedule in another update. We’re running 4.4.3.60 at the moment.Brilliant – too easy!
I actually inserted this to make the link appear in the next column:
<tr style="display: table-row;"> <td valign="top" width="113px" class="ms-formlabel"></td> <td valign="top" class="ms-formbody" width="350px"> View Labels </td> </tr>
Thanks Alexander
- This reply was modified 5 years, 4 months ago by Cameron.
Thanks Alexander,
That’s correct, Job is the name of my Lookup field.
Unfortunately I haven’t been able to get this to work. I noticed that Title and ID would return from the item object so I’ve got it working with the code below… but it’s slow.
Basically I pass the ID and Field I want to check to another function which uses spjs_QueryItems to check if the field is set.
function isUnconfirmed(arg,item) { //if a job return blank if(!(lookupValid("Job",item.get_item("ID")))){ //Not a Job, check if Quote accepted var parsedDate = Date.parse(arg); // You want to check again for !isNaN(parsedDate) here because Dates can be converted // to numbers, but a failed Date parse will not. if (isNaN(arg) && !isNaN(parsedDate)) { //Valid Accepted Date found, return nothing return ""; } else { return "*"; } } else { //Item has a Job set, return nothing return ""; } } function lookupValid(strField,intID){ //Function looks up the field for the supplied ID and returns true is a valid value is found if(isNaN(intID)||intID<1){ console.log("Invalid ID supplied"); return false; } qb = []; qb.push("<Where>"); qb.push("<Eq>"); qb.push("<FieldRef Name='ID' /><Value Type='Text'>"+intID+"</Value>"); qb.push("</Eq>"); qb.push("</Where>"); res = spjs_QueryItems({"listName":"Stock Movement","listBaseUrl":"../..","query":qb.join(""),"viewFields":[strField]}); if(res.count > 0){ item = res.items[0]; if(item[strField]===null){ return false; } else{ return true; } } else { return false; } }
No problem, we’ve got a reasonable workaround in place.
We’re using Sharepoint Online (2013) with these DFFS Versions:
DFFS frontend: 4.4.2
DFFS frontend CSS: 4.21 /
Autocomplete: 1.4.9
Cascading dropdowns: 3.532
jQuery: 1.12.4
Lookup: 1.1.5
Resource management: not loaded
SPJS-Utility: 1.270
vLookup: frontend v2.2.77Cameron
- This reply was modified 8 years ago by Cameron. Reason: Added Sharepoint Version
Thanks Alexander!
That’s a much more precise approach than mine. It works perfectly – numbers are tel links and other scripts appear to be unaffected.
Fantastic thanks Alexander! The Content Types are a bit of a mess on these lists (and come to think of it, that may be a factor). These lists are both using a custom content type that have the parent type “Issue”.
The other thing I’ve found is that it appears to only be a GUI issue. If I setup the rules and tabs using another field and manually edit the blob with the correct FIN the functionality works fine – until I edit the DFFS settings and forget to manually edit the blob again :-).
Cameron
I’m still making small steps in debugging this myself but I think it’s now getting beyond my javascripting abilities.
I’ve found that spjs_editFieldProperties.js isn’t listing the field because it fails the !oField.get_fromBaseType() test. I’ve updated that if statement to
if(!oField.get_fromBaseType() || oField.get_staticName() === "Title" || oField.get_staticName() === "Category")
It is now listed by spjs_editFieldProperties.js. What I can’t find is why DFFS will not show this field.
I’ve just encountered this again on another list. The common element seems to be the the FieldInternalName is Category again, see the page source:
<tr> <td nowrap="true" valign="top" width="113px" class="ms-formlabel"><span class="ms-h3 ms-standardheader"> <nobr>Series<span class="ms-accentText" title="This is a required field." > *</span></nobr> </span></td> <td valign="top" width="350px" class="ms-formbody"> <!-- FieldName="Series" FieldInternalName="Category" FieldType="SPFieldChoice" --> <span id='WPQ26424c6e2-0955-4215-85c8-e270d16a2f13Category' data-sp-control='SPFieldChoice' data-sp-options='{"mode":3,"source":"Category"}'></span> </td> </tr>
I’ve also setup a watch on spjs_utility and I can see Category listed under fields. So it appears to be finding the field but not displaying it.
Is there anything else I can check to get to the bottom of this? I’m concerned that if I go live on the site I’m going to need to recreate fields on all of my lists – I’ve had this on 2 out of 2 lists I’ve tested so far.
Cameron
Attachments:
I should add, the field missing is named Category. Attached is it’s settings.
Attachments:
-
AuthorPosts