none
SHP 2013 JSLink manipulate lookup field values RRS feed

  • Question

  • Hi,

    I have one list named "Countries" i have a column named "Country" with this values:

    Spain|Spagna

    Italy|italia .. ..

    In a second list named "test" i have a lookup field connected with Countries => Country.

    I want via JSLink in my new and edit form split the lookup values in base of browser localization

    for example browser languge selected English

    my lookup will show only

    Spain

    Italy

    otherwise browser Language selected Italian

    my lookup will show only

    Spagna

    Italia

    Can you help me please?

    Friday, March 31, 2017 12:40 PM

All replies

  • Hi,

    For this requirement, I have the suggestions for you:

    1, Since the original values in the parent list are “Spain|Spagna”, you will need to apply JSLink to NewForm/EditForm/DisplayForm/list view pages, to implement a consistent style based on the browser location;

    2, About get the browser location, you can rely on the geolocation API:

    http://tutorialzine.com/2016/06/quick-tip-detecting-your-location-with-javascript/

    3, According to the result return from geolocation API, change the HTML source code of the Lookup drop down control dynamically to display the corresponding values only.

    Best regards,

    Patrick 

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, April 3, 2017 3:16 AM
    Moderator
  • Hi,

    Just want to know if my reply helps you somewhere?

    Best regards,

    Patrick


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 5, 2017 1:15 AM
    Moderator
  • At the time of loading the page, you need to check the system language and on the basis of that you can change the binding of DDL in your OOTB form.

    Thanks, Amit Kumar, LinkedIn Profile ** My Blog

    Friday, April 7, 2017 7:44 AM