Forum Replies Created
-
AuthorPosts
-
Paul Lynch
ParticipantThanks this all works brilliantly.
Just one more question!
Is it possible to have this work in reverse?
So updating status in a vlookup child item, will update the vlookup parent item?
Trying to maintain an identical status same in both child/parent
Paul Lynch
ParticipantSorry did not read the previous answer properly, no worries thanks for checking!
Paul Lynch
ParticipantThanks Alexander,
only just had time to try this out but I get “undefined” which replaces the date field of DFFS form.
Sorry I just wanted to clarify I it is not a text string I am converting it is date field. I want to show 20 June 2020, instead of 20/06/2020
Fieldname – DateColumn1 (Internal fieldname – DateColumn1)
Column type – Date/Time fieldTried it on a couple of dates using internal field names of two dates on my form.
I’m no programmer but in first line of the js create and set a variable dispFormDate as the value from the date field from DateColumn1 (DateColumn1 is the existing date field, not a text string created by a timedate stamp)
Paul Lynch
ParticipantNewForm
Second tab has the vlookup. The person clicks uploads a record to child library, fills in metadata and then the vlookup table renders. That’s all good.
They then click third tab, which has a Js button, which should submit form and run the function but nothing happens (hence I checked console).
Actually want to run two functions, send an email AND update the status of the child form, but left out email function until I get this to work.
Attachments:
Paul Lynch
ParticipantSorry might have confused things with the script and I also left out some code.
Just a standard date/time field in SP – which I would like to show in a “friendly” way.. e.g.15 June 2020 rather than 15/06/20 which is how it shows in the SP form by default.
Paul Lynch
ParticipantTrying to implement this fix and struggling.
Parent List
Parent List Name (List) – TRLRPTS
vLookup fieldname – vLookup_Children
Internal fieldname – StatusChild List
Child List Name (Document Library) – TrialReports
Child list GUID – {ADA5EC4A-7D6D-4AFC-9AFA-21F47C2E1480}
Internal fieldname – statusBoth above fields are single choice columns..
Here is my code:
function callMeFromChangeRule(){ var arrOfIDs = []; jQuery.each(spjs.vLookup.dataObj.vLookup_Children[spjs.dffs.data.thisItemID].items,function(id,vLookupListItem){ arrOfIDs.push(id); }); spjs.utility.updateItem({ "listName":"{ADA5EC4A-7D6D-4AFC-9AFA-21F47C2E1480}", "id":arrOfIDs, "data":{ "status":getFieldValue("Status"), } }); }
I’ve attached the console error..
-
This reply was modified 3 years, 3 months ago by
Paul Lynch.
Attachments:
Paul Lynch
ParticipantThanks this worked great and Js can populate the time/date stamps on event.
Final question on time and date formatting!
What is the best way to show a “friendly” time/date format in the form? I have the date/column fields set to “friendly” but I think that only shows this in the list itself.
At moment I am using this script;
$("span.NAMEOFSPAN").html(qRes["SP_DATE_COLUMN_IN_LIST"].split(";#")[1]);
Then showing it in HTML field
<h4><strong>Date Issue Occurred: </strong><span class="NAMEOFSPAN" /></h4>
I then have to use rules to hide the SP_DATE_COLUMN_IN_LIST in the form, and replace with the HTML date field.
Wondering if there is a more efficient way?
Paul Lynch
ParticipantWorks perfectly thanks Alexander will send some beers your way!
Paul Lynch
ParticipantSorry for some reason I forgot the ribbon is at the top of the page! But a scroll bar would be nice, if we could fix the size of the box, as there might be fields under neath the multi line text field.
Paul Lynch
ParticipantSorry one more question on this.
The first two options seem to be setting a fixed time/date
Is it possible to use the {timestamp} keyword in the custom js like this?
setFieldValue("DateColumn1", [{timestamp[MM/dd/yyyy]},{timestamp[HH]},{timestamp[mm]}]);
Paul Lynch
ParticipantVersion information
DFFS Loader: v2
DFFS frontend: 4.4.5.0 – June 1, 2020
DFFS frontend CSS: 4.60 /
Autocomplete: 1.6.48 – May 10, 2020
Cascading dropdowns: 3.7.40 – June 1, 2020
jQuery: 1.12.4
Lookup: 1.1.20 – March 10, 2020
Resource management: 2.4.5 – August 29, 2019
SPJS-Utility: 1.347 – June 1, 2020
vLookup: 2.2.155 – June 1, 2020although I think I did replace this file SPJS-utility_v1.348.zip from a recommendation in another post about rules
-
This reply was modified 3 years, 3 months ago by
Paul Lynch.
Paul Lynch
ParticipantI’m on the latest production version
But I still cannot see people picker and also multi-choice fields when I set them to read only in Chrome and IE, but it is working in Firefox!
Paul Lynch
ParticipantThanks Alexander, this works great and populates the SP date and time field.
Paul Lynch
ParticipantI’ve tried so many but given up, left it on this one for now which populates the correct date (no idea which timezone) but puts time as midnight 00:00
{timestamp[MM/dd/yyyy HH:mm:ss]}
Paul Lynch
ParticipantJust to let you know that this is now populating the date, just not the time!
{timestamp[MM/dd/yyyy HH:mm]}
will keep trying different time permutations!
-
AuthorPosts