vLookup Refresh New

Home Forums vLooup for SharePoint vLookup Refresh New

Viewing 12 reply threads
  • Author
    Posts
    • #31463
      Tricia S.
      Participant

        Hi Alexander,

        I’m having issues with the vlookup on New Form.

        My connection is set up right because it loads correctly when the form loads, But If try to refresh OR add a new item nothing happens and the loading icon just keeps going and going, never resolving.

        Any help would be greatly appreciated.

      • #31472
        Alexander Bautz
        Keymaster

          Which version of vLookup are you running? – I think this is a bug that is already fixed some time ago.

          Alexander

        • #31474
          Alexander Bautz
          Keymaster

            Also, please include a screenshot of your configuration for this vLookup field.

            Alexander

          • #31480
            Tricia S.
            Participant

              I’m on June 28 and I looked thought the Change log but didn’t see anything calling it out.

              Let me know if I missed something and should update.

            • #31483
              Alexander Bautz
              Keymaster

                No, the version I thought about was over a year old.

                Can you try hitting F12 in to bring up the developer tools in the browser and then click the Console tab before you try to refresh the vLookup table – any error messages in the console?

                Also, a screenshot of the vLookup config might give me some clues.

                Alexander

              • #31485
                Tricia S.
                Participant

                  Attached is the console before the refresh. There was no change after the refresh.

                  I also tried to call the refresh manually.

                  When I tried to Refresh with the Debug open I noticed that the debug details never change, on the edit from it added details at the bottom showing the refreshed work .

                  Let me know what you think.

                • #31491
                  Alexander Bautz
                  Keymaster

                    I need to see a screenshot of the vLookup config tab in your DFFS backend – the query part and the ViewFields part of this specific field.

                    Alexander

                  • #31493
                    Tricia S.
                    Participant

                      Here you go.

                    • #31502
                      Tricia S.
                      Participant

                        I would note that I have changed the vLookup connections a number of time with no change. I originally had it set up with the _vLookupID and _vLookupPurchaseID and I also did Title Equals Title.

                        All of them worked fine in Edit. This what just the last thing I tried.

                        Let me know if you need anything else.

                      • #31511
                        Alexander Bautz
                        Keymaster

                          I looked at the error messages again and it shows that your custom js function vLookupIsLoadedCallback (in your parent form NewForm) is the origin if the error.

                          Please post your function here so I can look at it.

                          Alexander

                        • #31516
                          Tricia S.
                          Participant

                            Hi Alexander,

                            I looked into the vLookupIsLoadedCallback and It seems that it works fine unti spjs.dffs.data.thisItemID

                            Any ideas why this would return as an empty string in the new form?

                            I was using the functions from a previous post to Total and set a field.

                            
                            
                            function vLookupIsLoadedCallback(fin){ 
                             if(fin === "vLookupItems"){
                             	//Get Total from vLookup ceiling, if not active dont run at all
                             	   var vLookupTotal1 = spjs.vLookup.dataObj["vLookupItems"][spjs.dffs.data.thisItemID].tot["Cost"];
                             	    setFieldValue('TotalCost',translateNumberToCurrency(vLookupTotal1));
                            
                             }}
                          • #31519
                            Tricia S.
                            Participant

                              Hi Alexander,

                              Found it. Just took more digging on your blog to go back to 2018.

                              On the new form, have to use:
                              spjs.vLookup.dataObj.vLookupItems[getFieldValue(“_vLookupID”)].tot
                              OR
                              spjs.vLookup.dataObj[fin][getFieldValue(“_vLookupID”)].tot

                              https://spjsblog.com/forums/topic/totals-row/

                              Since this is preventing the vLookup from refreshing, on new, will there be plan for a patch?
                              Or since its our choice to use the custom callback code, we just need to be aware that we need two different things for new and edit.

                              Thanks for All the help!

                            • #31521
                              Alexander Bautz
                              Keymaster

                                I’m glad you figured it out. Unfortunately I cannot patch this because it – as you mentioned – is in custom js and I don’t really have any control over the use of variables there.

                                The reason for not being able to use spjs.dffs.data.thisItemID in NewFrom is that there are no ID for the current item until you have actually saved it to the list.

                                Alexander

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