[Eg-newdevs] get_tcn function scope

Terran McCanna tmccanna at georgialibraries.org
Wed Jun 16 16:37:48 EDT 2021


Thank you!! I will try that!


Terran McCanna, PINES Program Manager
------------------------------

Georgia Public Library Service | University System of Georgia

2872 Woodcock Blvd, Suite 250 l Atlanta, GA 30341

(404) 235-7138 | tmccanna at georgialibraries.org

http://help.georgialibraries.org | help at georgialibraries.org

<https://www.facebook.com/georgialibraries>
<https://www.twitter.com/georgialibs>
<https://www.instagram.com/georgialibraries/>
<https://www.twitter.com/georgialibs>

Join our email list <http://georgialibraries.org> for stories of Georgia
libraries making an impact in our communities.



On Wed, Jun 16, 2021 at 4:36 PM Josh Stompro via Eg-newdevs <
eg-newdevs at list.evergreen-ils.org> wrote:

> Terran, I think the get_tcn function is in scope... it just doesn't return
> a value.  I followed the code in the developer console and it does grab the
> tcn.
>
> The function sets the $scope.local_overlay_target_tcn to be equal to the
> found tcn value.  But it doesn't return it.
>
>     function get_tcn(currTarget) {
>         egCore.pcrud.retrieve('bre', currTarget, {
>             select: {bre: ['tcn_value']}
>         }).then(function(rec) {
>             $scope.local_overlay_target_tcn = rec.tcn_value();
>         });
>         return;
>     };
>
> Maybe the function should just return the value... and then instead of
> just calling it like
>
>   } else {
>             $scope.local_overlay_target = items[0]['bibid'];
>             var currTarget = items[0] ['bibid'];
>             get_tcn(currTarget);
>         }
>
> You would use
>
>   } else {
>             $scope.local_overlay_target = items[0]['bibid'];
>             var currTarget = items[0] ['bibid'];
>             $scope.local_overlay_target_tcn = get_tcn(currTarget);
>         }
>
> Josh
> [image: Company logo]
> *Josh Stompro*
>
> *IT Director stomproj at gsuite.larl.org <stomproj at gsuite.larl.org>*
> *218-233-3757 ext. 139* | *Mobile: 218-790-2110*
>
> *Lake Agassiz Regional Library | **www.larl.org <http://www.larl.org>*
> 118 5th ST S
> Moorhead MN 56560
> *Celebrating 60 Years of Service in 2021!*
> _______________________________________________
> Eg-newdevs mailing list
> Eg-newdevs at list.evergreen-ils.org
> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/eg-newdevs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/eg-newdevs/attachments/20210616/6ce7b4fb/attachment.html>


More information about the Eg-newdevs mailing list