Get data from another list in the new form

rss

Posted by SPTech - Sep 1 ’15 at 06:39

Hi,

We have two different lists, one of them is for employee data. It is holding employee information and number of leave of absence days of each employee. The other list is for leave of absence request. An employee creates a leave of absence request from new form. What we need is to show how many leave of absence days left for the employee who is creating the request in the new form. We tried to get current login name and use it with related items to get data from the employee data list but it is not feasible as we just need one column value and show it in a plain text control. We really stuck at this point and any help will be appreciated.

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #1 by Dmitry Kozlov Sep 1 ’15 at 08:03

    Hi

    What you'd need to do is use JavaScript to:

    Our support team can help you with this task, it will take 100 support minutes. If you're interested, please, pay for the support minutes in our store and send templates of both lists to [email protected] To get the templates, please, go to the List Settings -> Save list as template. We will start working on the task the next day after the payment.

  • SPTech
    Member
    Member for: 4 years 2 months 24 days
    #2 by SPTech Sep 1 ’15 at 08:28

    [#1]: Hi Dmitry,

    Thank you for the reply.

    Is this way a little unsafe ? I mean code will work on client side and if a user try to intercept and change the username variable before sending it to server then it will be possible to get other user's data ?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 28 days
    #3 by Dmitry Kozlov Sep 1 ’15 at 08:37

    [#2]: If you're using a User or Group column, we can filter the 'Employee' list by the current user without passing his login. CAML-queries support [Me] token:

    https://christopherclementen.wordpress.com/2012/03/12/filter-on-current-user-with-caml-query/

  • SPTech
    Member
    Member for: 4 years 2 months 24 days
    #4 by SPTech Sep 3 ’15 at 08:29

    [#3]: Thank you very much Dmitry, I have successfully completed the development using the sources you provided.

Displaying 1 to 4 of 4 messages