0

I need to get lookup values, but i cannot use SharePoint Designer. I tried to use the solution proposed there, but it does not work with document libraries. It raises an error:

"Unable to get property 'Row' of undefined or null reference"

Maybe, it's different property for document library, not ListData?

user59321
  • 1
  • 1
  • You need some pretty good JavaScript skills to get this right.. and.. all those tricks no longer work in the New Experience Document Library. Given your question my advice is not to use it. – Danny '365CSI' Engelman Aug 23 '16 at 17:19

1 Answers1

0

You cannot use lookup fields in Column and List \ Library validation or Calculated field , You will have to use

  • The object model to create a validation.

  • Or change Lookup field to Choice Field

  • Or Javascript Validation as something like this based on your formula

<script type="text/javascript">
    function PreSaveAction() {
        var amount= document.getElementById("Lookup Field ID");
        if (amount.val() > 1000) {
            alert("");
            return false;
        }
        return true;
    }
</script>
Mohamed El-Qassas MVP
  • 45,382
  • 9
  • 53
  • 96