Forum Replies Created
-
AuthorPosts
-
Hi,
Finally getting back to this issue. I have a work around so that I can now edit the default forms.
One question, I have is whether there is any issues configuring a site to use both methods, jslink, and cewp, for different lists? I have some lists configured with the jslink, as that is my preferred way of doing things, but as some lists aren’t working with the jslink configuration, I am going to use the cewp for those.
Regards
Jeff…and looking at this on another day, I manage to find the answer.
spjs.lookup.setValue(“FieldInternalName_of_your_field”,”The value you want to set”);
All sorted.
Sorry, this was supposed to be a new post, not attached to this one.
Hi
I have been using the Lookup function for a while and have it working fine on a library that contains documents received from various companies. The current process is that a file is added to the library, and then the user fills out the form to update the metadata for that new item.
Company Name is one of the metadata fields, and it is a SLOT which is use the Lookup function on querying the Companies list to get a list of all possible companies in a dropdown which the user can select which one.
I have now realised that since the company name is the first part of the file name, I could parse the file name and automatically populate the Company Name field for the user. I have now added a “Parse File Name” button on the form which calls a custom function to parse the file name and extract the company name.
This all works, and it also updates the field but the form field does not get updated. ie the Company Name field still displays the default value of “select company”, but after saving the form, the real Company Name is displayed in the list, and will appear in the form when editing it. (I am using the setFieldValue function to set the company name field)I also get a couple of other parameters from the file name, such as a Reference, which is just a SLOT, and also a Document Type (Invoice, Statement, etc) which is a Managed Metadata field, and both of these fields are updated on the form when I use the setFieldValue function to update them.
So, I am guessing that there is some subtle trick to getting a field which is controlled by spjs.lookup to update if the field changes behind the scenes as it were?
Regards
JeffI have an open ticket with Microsoft for this at the moment. They are apparently working on some hotfix. Hopefully it will be resolved soon so I can get back to what I was doing on that site 🙂
Hmmm. Still working on this. I am gone back to using CEWP method, and now get a completely blank top menu area when I select the List -> Form Web Parts -> Default xxxx Form.
Makes it a bit difficult to add anything when I have no options to choose from. 🙂
Will keep looking at this to see if I can get anywhere, and will update, when resolved.
April 14, 2016 at 08:34 in reply to: Can I make fields read-only, or non read-only, in a functioncall #11106Thanks Alexander. Finally got the plot and it is now working.
Thanks Alexander. I’ll give this a go.
I have used vLookup in another place, but what I was looking for was something that I could easily use some custom css/html to format the fields in a specific way. The ideal output that gets printed would look something like a fully “branded” certificate.
I haven’t looked to hard at what I can do with regard to the output of vLookup, so it is an option. At least if I can get the info using the QueryItems, then I can use that as a starting point/fallback position.
I’ll let you know how I go, and once again thanks for you response.
Regards
JeffThanks. That seems to have done the trick!
… or just remove webpart??
Indeed it does! My problem was that the test data I was using had trailing spaces after some of the “duplicate” entries.
Not a problem now that I know to check for it 🙂
Hi,
I tried the tool, but the missing field E-Mail, is still missing. ie not showing up in the list.
While I would be interested to know what the problem is, I am working through adding another field, Email 2, and copying all the data into that. This will become the new, real, email field. It could be because of some action that happened when the list was originally created. There has been a lot of modification to it since it was created 🙂
At least this is visible and works as expected.
Thanks for your response.
JeffOk, found the problem… Actually a combination of 2 things, but the primary one was.. and this is even more embarrassing as this didn’t get copied across correctly above…
I seem to have added a $ in front of spjs.lookup.init({.. eg $spjs.lookup.init({…
It does have to be without the $ sign 🙂
By removing that $, and making sure the CEWP was below the form, I now get a result!!
Hi,
That’s what I have used, but as calculated columns are not appearing in the list of fields for me to display when laying out fields on the Tab page, I started looking for another way of doing this.Should calculated fields be recognised in the list of available fields in DFFS?
While on this subject I also notice that the additional fields that have been selected in defining lookups are also not available for displaying. eg if I have a list of Venues that also have an address and a phone number, and I have defined these to also be returned when I do a lookup on the Venue Name, these extra two fields are not available in the list of fields in DFFS.
Regards
JeffHi,
Well there might be other ways, but I have got this working using the Custom JS section, and referring to the function in the rules.In Custom JS:
function calcTournamentYear() { var startDate = getFieldValue("EventDate"); var newStr = startDate.substring((startDate.lastIndexOf('/')) + 1); setFieldValue("TournamentYear", newStr, false); }
I have a rule to trigger if the field “Start Time” is changed and I have specified calcTournamentYear in the Run these functions field.
Regards
Jeff -
AuthorPosts