Vlookup using date time values

Home Forums vLooup for SharePoint Vlookup using date time values

Viewing 3 reply threads
  • Author
    Posts
    • #38346
      James
      Participant

        Hello,
        I’ve tried researching through multiple resources, including the forums and general online options and haven’t been able to find a valid solution to this. Trying to run a V look up that uses two fields of dates to identify all items on the child list that have a date between the range. I attempted using camp as well as just the lookup options and haven’t been able to get it to provide results. The end goal is to create a camel query that allows me to validate against a plain text name field,a choice field of canceled or complete and two date ranges. Any help would be greatly appreciated.

      • #38347
        James
        Participant

          I also apologize for the typos. My phone keeps auto correcting.

        • #38348
          Alexander Bautz
          Keymaster

            If you can create a view in your list that gives you the items you want, you can get the CAML query using this snippet of code. Just hit F12 to bring up the developer tools, select the Console and paste the below snippet (you might have to type in the text “allow pasting” if you cannot paste the text):

            const payload = {
                method: 'GET',
                headers: { "Accept": "application/json; odata=verbose" },
                credentials: 'same-origin'
            }
            
            fetch(_spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getById('"+_spPageContextInfo.pageListId+"')/views/getById('"+_spPageContextInfo.viewId+"')", payload ).then(data => {
                return data.json()
            }).then(json => {
                console.log(json);
                console.log(json.d.ViewQuery);
            });
            

            Alexander

          • #38361
            James
            Participant

              Thank you for the follow up. I was not able to leverage this solution based on GET functionality restrictions but was able to create a workaround by assigning a variable to convert the date to iso format and using the variable as the filter in caml.

              • #38363
                Alexander Bautz
                Keymaster

                  I’m glad you figured out a solution.

                  Alexander

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