spjs.dffs.data.lcidToDateFormat

Forums Dynamic Forms for SharePoint spjs.dffs.data.lcidToDateFormat

Viewing 20 reply threads
  • Author
    Posts
    • #7334
      Říha Michal
      Participant

      Hello Alexander,
      I have this message:
      The date format for LCID undefined is not configured.
      Either make a request for an update here: https://sharepointjavascript.wordpress.com/
      Or add the correct format in the variable
      “spjs.dffs.data.lcidToDateFormat”.

      How to do it? I use Czech language – lcid=1029 (dd.mm.yyyy)
      Thanks
      Michal

    • #7341
      Říha Michal
      Participant

      Solved – caused by wrong rule.
      Adding a new entry to lcidToDateFormat for LCID 1029 with no result, but corect wrong rule solved this issue.
      Michal

    • #7354
      Alexander Bautz
      Keymaster

      I’m glad you figured it out.

      Alexander

    • #7613
      Corina Honegger
      Participant

      Hi

      I get the same error when I try to compare a date field in my form (Trigger: field changed) to [today]. I wan’t to set a rule [if date field is less than [today]]. Is there a way to get around?

      Thanks
      Corina

    • #7630
      Alexander Bautz
      Keymaster

      Hi Corina,
      What LCID (language) are you using in your SharePoint site?

      Alexander

    • #7642
      Corina Honegger
      Participant

      English, where canIi find the exact value?

    • #7645
      Alexander Bautz
      Keymaster

      Hi,
      You can find it by looking at the page source – depending on which version of SharePoint you use, the variable is either “L_Menu_LCID” or “currentLanguage” as property of the “_spPageContextInfo” object.

      Could you have other errors in some custom code that causes this? – look at the developer console (hit F12 > Console).

      Alexander

    • #7676
      Corina Honegger
      Participant

      I get this message in the console and the one which is attached is popping up:
      Uncaught TypeError: Cannot read property ‘separator’ of undefined
      spjs.dffs.strToDateObj @ VM3509:1
      (anonymous function) @ VM3509:1
      m.extend.each @ jquery-1.11.1.min.js:2
      spjs.dffs.applyRules @ VM3509:1
      (anonymous function) @ VM3509:1

      Language field is:
      var L_Menu_LCID=”1033″;

      Attachments:
    • #7691
      Alexander Bautz
      Keymaster

      Hi,
      Sorry for the delay, the problem is that the variable is undefined. Can you post here (or email to me) screenshots of the rule that causes this error?

      Also, specify the version number for DFFS frontend and backend, and the SharePoint version.

      Alexander

    • #12365
      Brent Miller
      Participant

      Hi Alexander,

      I have run into this same issue as Corina and Riha. I can’t remember how, but after I got the initial error I checked around in the developer console and it said there was a splitter issue that appeared to be in reference to it splitting the date and time into separate fields. My LCID is 1033, but like Riha Michal, deininf it in the code hasn’t changed anything. I don’t know if I have a “wrong rule” like him, but I would very much like to get this solution to work. Thank you so much for any assistance you can offer.

    • #12399
      Alexander Bautz
      Keymaster

      Hi,
      Are you using any custom code to set a date and time column, or do you use the “set field value” in a rule to do the same?

      Alexander

    • #12403
      Brent Miller
      Participant

      There shouldn’t be anything custom. After I got this error on our main list, I created a brand new list to use as a control. I added a column to be the resource, and then I added a start date “date and time” column and an end date “date and time” column. After that I added the solution to the default form. I didn’t do anything else and I got the same error as on the main list. If there is anything I can provide to help figure this out please let me know. I’d really like to find a way to get this to work. Thank you.

      • This reply was modified 4 years, 3 months ago by Brent Miller.
    • #12430
      Alexander Bautz
      Keymaster

      Is the error originating from the resource-management solution? – I use the function “lcidToDateFormat” in both.

      Can you attach a few screenshots of the form and your setup so I can try to understand where the error originates from?

      Alexander

    • #12445
      Brent Miller
      Participant

      I’ve attached pictures of most everything I could think of as well as the full code for the form in question.

    • #12453
      Alexander Bautz
      Keymaster

      Hi,
      The reason for the error message is that the query to find the correct LCID (language) of the list you are targeting fails to return the LCID.

      The “spjsRmArgs” object is set up for SharePoint 2007, and I guess this is why it fails. Try removing the “listName” from this object.

      var spjsRmArgs = {
      "resourceField":"resource",
      "dateFrom":"StartDate",
      "dateTo":"EndDate",
      "timeFormat":24,
      "bookableTimeRangeActive":false
      };
      spjs.rm.init(spjsRmArgs);

      Alexander

    • #12456
      Brent Miller
      Participant

      I get the same error as before, but a new error preceding it. It actually tells me to add in the list name which is why I had it in there before. I’ve attached an image of the error. Once I click past this new error, I get the same LCID error as before immediately afterwards. I can’t imagine there is any setting in our sharepoint site that could be causing this as I’ve tried it in our onsite 2013 version and then I’ve tried it in the cloud where we just migrated to. Any other ideas? Thank you for your help.

      Attachments:
    • #12467
      Alexander Bautz
      Keymaster

      Can you open the developer console (hit F12 > Console) and type in this and press enter:

      _spPageContextInfo

      How does the output look?

      How are you referring the scripts? – in a CEWP in the page? – the reason I ask is that the check to see if you are using SP 2007 or newer is done by checking the variable _spPageContextInfo to see which version it returns. This variable does not exist in SP 2007, but is loaded with the master page in SP 2013. If you have added the script file in the master page, and it loads before the default SharePoint files you will get this error.

      Alexander

    • #12471
      Brent Miller
      Participant

      I’m not entirely sure what you mean by referring the scripts, but there aren’t any CEWPs in the current page. I am a programmer, but I’m still pretty new to sharepoint and web coding in general. I checked all the master pages I know of and didn’t see anything that looked like a CEWP. That said though, we HAD sharepoint 2007, migrated to 2010 and recently to 2013(now to the cloud). So I’d be shocked if there wasn’t some left over code in the page somewhere, but I’m not really sure how to find it if that’s the case.

      Here is the output and I attached an image of the console as it mentions SCRIPT5 having Access denied. Wasn’t sure if it was relevant.

      [object Object]{alertsEnabled: true, allowSilverlightPrompt: “True”, clientServerTimeDelta: -3704, crossDomainPhotosEnabled: true, currentCultureName: “en-US”, currentLanguage: 1033, currentUICultureName: “en-US”, env: “Prod”, hasManageWebPermissions: true, isAnonymousGuestUser: false, isAppWeb: false, isSiteAdmin: true, layoutsUrl: “_layouts/15”, pageListId: “{558f7f7d-5…”, pagePersonalizationScope: 1, ProfileUrl: “https://ass…”, serverRequestPath: “/Lists/Test…”, siteAbsoluteUrl: “https://ass…”, siteClientTag: “355$$16.0.5…”, siteServerRelativeUrl: “/”, systemUserKey: “i:0h.f|memb…”, tenantAppVersion: “0” …}

      Thank you again for all of your help.

      Attachments:
    • #12486
      Alexander Bautz
      Keymaster

      The output looks right. What I meant by “referring the scripts” was how you have set up the resource management solution. Are you using it with DFFS or as a standalone solution – from the screenshot it looks like you don’t use DFFS?

      If you use it standalone, I guess you have put a CEWP or script editor web part in the page to load the script?

      Alexander

    • #12521
      Brent Miller
      Participant

      Sorry it took me so long to reply, I got super busy and wanted to test thoroughly before replying. To answer your question I wasn’t using either of those. I had been advised to put the code into an </asp:Content> tag instead. After putting it into a CEWP it actually still didn’t work, but this was actually because the excess code I had added to make it work before was breaking it. Once I removed that it seems to be working perfectly now. Thank you so much for all of your time and patience. You are a life saver.

    • #12532
      Alexander Bautz
      Keymaster

      I’m glad you figured it out.

      Alexander

Viewing 20 reply threads
  • You must be logged in to reply to this topic.