Filter using microflow, XPATH.

0
  Hi,   Newbie Question here....   I am implementing a feature which filters the jobs based on a location. So I have created a new user roles with different locations and also added a new enumeration "location" attribute in the job.    I have to compare the current user's role to the enumeration "location" attribute then returns the jobs that corresponds to the user role's location. How can I implement this? From my screenshot It has some error when comparing it in a decision in a microflow.   TYIA
asked
2 answers
2

Looks like you try to compare a association with a list of UserRole, which cannot be done. In XPath you can only compare on a single object(id) or attribute.

 

Next to that; Not sure if your solution of the user role with location is the way to go. 

answered
1

Hello Gil,

 

I would not recommend your 'solution' rather go for:

 

1. Create an entity Location

2. Add Account entity to this entity via association

3. Add Job entity to this entity via association

 

- The entity Location acts as Masterdata and can be managed by an administrator/functional admin.

- Under user management you should make it like you can attach user to a specific location or maybe even multiple locations.

- Under job management you can also add those specific locations.

 

Doing the above will make it possible to filter the people based on the location of the job, or the way around the jobs based on the location of the person.

 

I'm not sure if this is the correct learning path:

Expand Your Domain Modeling Skills

 

But there is a learning path with quite a similar usecase, I would highly recommend to cover your base and first complete most of the learning paths. It will help you a lot with the basic stuff which otherwise cost you at least the same if not more time ;-)

 

Kind regards,

 

Thijs

 

 

answered