Dhivya.L - Tuesday, February 5, 2013 1:46 AM:
Hello,
I want to populate the Employee information(first name, last name & extra) automatically in Employee information Form, based on the Login User Name of the User Form.
Example:-
1) I have EIM(Employee information form). In this EIM form i have the fields (first name ,last name & etc).
2) In Aras innovator, already we have the "Users" Form (Adding users in to Aras.) In this Users form We have all the User information’s (like first name, last name & etc).
3) When manager login to the Innovator and open the EIM form, There "Login user name" field should be present in EIM form. By selecting the Login user name, the manager can able to see all the Personal information of the user from Users Form. [like he can able to see the first name, last name and other fields details.]
How can i do it ?. Can anyone provide me the steps and code as soon as possible please.
Thanks,
Dhivya. L
asha_gholve - Tuesday, February 5, 2013 6:27 AM:
Hi,
Use foreign property to achieve this. and to set Login user name use onFormpopulated Event. this will automatically render the info from user form.
Regards,
Asha
Dhivya.L - Wednesday, February 6, 2013 12:24 AM:
Hello asha,
Thanks for your reply. If you dont mind could you please tell me the steps and code for doing this.
Thanks in advance
Dhivya. l
asha_gholve - Wednesday, February 6, 2013 1:38 AM:
hi Dhivya,
Add one property(suppose name is logdInUser) with datatype Item and data source as User.
Now add another property with datatype foreign and in data source you will find a tree with all the Items property now expand logdInUser property and select the property which you want to display from User Item.
Create property with foreign datatype for every property you want to display from user Item.
And set logdInUser to loogged in user using getUserID() function.
Regards,
Asha
Dhivya.L - Wednesday, February 6, 2013 4:25 AM:
Hi Asha,
Thanks,
As per my understanding, what i have tried is bellow;
1) personal information form I kept two fields(First name, last name) with datatype as Text.
2)In Personal information Item type, i have created One property with the name (LoginUser) with Datatype Item and Datasource as User., As you said.
3)I have created another property with the name(First name) with data type foreign and in datasource i founfd the tree structure, There i have selected the first name from the tree [LoginUser-->First Name].
Is it correct up to this?
Then i need some clarification;
1) If the steps correct what ever i have done above, Next what steps i need to perform ?
2)What is this line meant to say ; "set logdInUser to loogged in user using getUserID() function". ?
3) Where i need to set the LoginUser ? where i need to write the getUserID() function ?
4) What code i should write in getUserID() function ?
If you could help me out this, It will be very helpfull to me.
Please get back to me soon.
Thanks in advance,
Dhivya.L
Dhivya.L - Thursday, February 7, 2013 5:55 AM:
Hello Asha,
Could you please kindly get back to me on this ?
Thanks in advance,
Dhivya.L
asha_gholve - Friday, February 8, 2013 2:28 AM:
hi Dhivya,
getUserID() is a aras API you can use it directly. write a method onFormpopulated which will set the properties.
Regards,
Asha
Dhivya.L - Monday, February 11, 2013 6:37 AM:
Hi ahsa,
could you please help me with the sample code, what i should write in onFormpopulated.
Thanks in Advance.
Dhivya.L
Dhivya.L - Monday, February 18, 2013 6:11 AM:
Hello Asha,
Could you please kindly get back to me....
Thanks in advance,
Dhivya.L
fli - Thursday, February 21, 2013 5:16 AM:
Hi Dhivya,
Something like this
var myInnovator = new top.Innovator();
var userID = myInnovator.getUserID();
document.thisItem.setProperty("forignItem","userID"));
br Christoffer