Hi, 

     I need to pass the current EmployeeId to the Employee file entity . I have done it if the employee already exists and I don't know how to do it for new Employee since it will be created during save. Let me know if you find the solution.

Hi Balaji,

Can you elaborate what issue exactly u r facing?


Regards,
Amreen

Amreen wrote:

Hi Balaji,

Can you elaborate what issue exactly u r facing?


Regards,
Amreen


See When I want to add files to new Employee, it doesn't get passed. For existing it gets linked.

 

Balaji Vinayagamoorthi wrote:

Amreen wrote:

Hi Balaji,

Can you elaborate what issue exactly u r facing?


Regards,
Amreen


See When I want to add files to new Employee, it doesn't get passed. For existing it gets linked.

 

Because EmployeeId is  yet not created . First you have to create employee then only allow usr to upload the files


Amreen wrote:

Balaji Vinayagamoorthi wrote:

Amreen wrote:

Hi Balaji,

Can you elaborate what issue exactly u r facing?


Regards,
Amreen


See When I want to add files to new Employee, it doesn't get passed. For existing it gets linked.

 

Because EmployeeId is  yet not created . First you have to create employee then only allow usr to upload the files



If you see my save logic , you can see how I'm trying to pass the EmployeeId created from CreateOrUpdateEmployee server action. I've done it for photo and similarly trying to do it. So, can you provide me how to pass the EmployeeId created to get updated in Employeefile Entity?


Hi Balaji,

Just Check

If your are getting employee id after creating employee .If you are getting that id then pass it to create action of employeefile .

Amreen wrote:

Hi Balaji,

Just Check

If your are getting employee id after creating employee .If you are getting that id then pass it to create action of employeefile .

Yeah you can see I'm using it but it does nothing and I'm doing something wrong. Are you telling me to pass the id when file is being created in popup screen.If so, tell me how to pass it?

Hi Balaji Vinayagamoorthi,

In your assignment action, could you pls try to assign the value of "CreateOrUpdateEmployee.Id" to "GetEmployeeFilesByFileId.List.Current.EmployeeFile.EmployeeId".

As like below,




Kind Regard's

Lakshmi Kumar Yadav

Lakshmi Kumar Yadav wrote:

Hi Balaji Vinayagamoorthi,

In your assignment action, could you pls try to assign the value of "CreateOrUpdateEmployee.Id" to "GetEmployeeFilesByFileId.List.Current.EmployeeFile.EmployeeId".

As like below,




Kind Regard's

Lakshmi Kumar Yadav


Yeah I've done that too but still it's not working

Balaji Vinayagamoorthi wrote:

Hi, 

     I need to pass the current EmployeeId to the Employee file entity . I have done it if the employee already exists and I don't know how to do it for new Employee since it will be created during save. Let me know if you find the solution.

Hi Balaji Vinayagamoorthi,

The difference between the employee already exists and the employee being a new employee, is just the ID.

If you use the CRUD CreateOrUpdate function, when you pass the attributes to the function if it has an ID, Update is used, if it has no ID, Create is used.


If you have an employee table and an employee file table, you must create the employee table first and then the employee file table. Because if you try to create an employee file table before creating the employee, it will not work.

Don't forget how you learned in OutSystems courses, when you have a binary belonging to an employee for example, you must separate the binary from the rest of the information, as I think you did and well, and the Id in the file table should be the Id from the employee table.


Cheers,
Nuno


Hi Balaji Vinayagamoorthi,


Please find attached oml.

Here, i have just updated your OnNotify action and also minor changes in your save logic.

Once you have added the file, you need to refresh the File aggregate, post which assign the employeeId in save logic.


Regards,

Lakshmi Kumar Yadav

Although with a different context, I will leave you with an example, which can help you.


I hope that this helps you.

Cheers,

Nuno

Lakshmi Kumar Yadav wrote:

Hi Balaji Vinayagamoorthi,


Please find attached oml.

Here, i have just updated your OnNotify action and also minor changes in your save logic.

Once you have added the file, you need to refresh the File aggregate, post which assign the employeeId in save logic.


Regards,

Lakshmi Kumar Yadav

Nope not working . Perhaps can anyone tell me how to bring a locally available list in popup screen to the parent screen. I've heard that we can use something like triggering an event . So how to do so?


Hi Balaji,

Their is no such way to notify a list from popup directly, rather you can use a temporary table/store the data is session to store and get data at parent screen and remove after use.

I have given a last try to code and attached the oml.

Kindly refer.


Regard's,

Lakshmi Kumar Yadav