How can I pass the id of my employee aggregate ?
Question

I am using the createEmpolyee function in my flow . I am trying to wrap it in a server action but when I try to pass data in the source of createEmpolyee . I get a error in expression editor that pass id parameter 

Screenshot (406).png

Champion
Solution

Hi Pratik,

If you want to retrieve employee information by using GetEmployee() function. Then you have to pass Id as input parameter.

For Example: GetEmployee(employeId).Employee.Name


But You are saying, I m using CreateEmployee Entity action.. 

CreateEmpolyee is used to create a new employee. So, you have to pass employee information as a source and there would be Id parameter too. Just Pass NullIdentifier(). It would create new record in Employee entity.

Thanks

I have 5 fields in create emplyee function do i have pass 

NullIdentifier() 

in every field ?

Champion

only in Id field.

other field like First Name you have to pass First name of employee and so on. Because you are creating a new employee.

It does not show me Id field in source of createEmployee 

Screenshot (407).png

Champion

Check my uploaded OML. I m passing NullIdentifier when I have to create new employee.

You can use CreateOrUpdateEmployee entity action for both l- Create a new employee and Update a employee data.

JobSchedule.oml

Champion

Then It's well n good. No need to pass. It automatically consider as NullIdentifier().

You need to specify the Empoyee id between the brackets of GetEmployee(). The function will return the last name of one specific employee...

Hi Pratik,

You need to specify the Id of the employee you want to retrieve from the db using the GetEmployee() action.
If you know the Id as input parameter (EmployeeId) it would become this: GetEmployee(EmployeeId).

Later in your flow you can use all the elements available in Employee table (like FirstName etc). 


can you share a oml file ? . i used getEmployee to get id but in it to it says pass id . i dont know how to get id 

What are you trying to accomplish? Create a completly new employee or update one?

If you want to create a new employee do as Rahul mentions. Just do CreateEmployee and pass NullIdentifier() as the Id. Other information will come from user input probably. 

If you want to update an existing user, you can use the EmployeeId to get the full record. 

I have to create a employee . the data will be inserted via user . inputting in form . i use aggreagete to hold my values

Champion
Solution

Hi Pratik,

If you want to retrieve employee information by using GetEmployee() function. Then you have to pass Id as input parameter.

For Example: GetEmployee(employeId).Employee.Name


But You are saying, I m using CreateEmployee Entity action.. 

CreateEmpolyee is used to create a new employee. So, you have to pass employee information as a source and there would be Id parameter too. Just Pass NullIdentifier(). It would create new record in Employee entity.

Thanks

I have 5 fields in create emplyee function do i have pass 

NullIdentifier() 

in every field ?

Champion

only in Id field.

other field like First Name you have to pass First name of employee and so on. Because you are creating a new employee.

It does not show me Id field in source of createEmployee 

Screenshot (407).png

Champion

Check my uploaded OML. I m passing NullIdentifier when I have to create new employee.

You can use CreateOrUpdateEmployee entity action for both l- Create a new employee and Update a employee data.

JobSchedule.oml

Champion

Then It's well n good. No need to pass. It automatically consider as NullIdentifier().

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.