Xpath - currentUser query

0
Hello all, We are building a workflow system and we want to show a List view to the user where He/She can see the List of workflows pending on them.In the domain model we have an attribute ‘Pending With’ in the entity. We have successfully accomplished it using microflow using constraint [pending_with = $currentUser/Name] But  a textbox  search functionality can not be provided in the listview when the datasource is based on Microflow. So we are trying to achieve the same using  Xpath constraint in Listview Datasource  [pending_with ='[%CurrentUser%].Name'] There are no errors ,but it is not working. Can you please guide how can it be achieved in Xpath   Regards Manas
asked
3 answers
2

Why not associate the workflow to an account? I would do:

  1. Create a new association between Account and Worklow, and call it ‘Workflow_Account_PendingWith’ 
  2. Create a datasource microflow to retrieve the account of the user;
  3. Create an Account dataview that is populated by this datasource microflow;
  4. Create a datagrid in the dataview that, from XPath, retrieves all Workflows associated to the Account with this new association I mentioned above.
answered
0

H Ivo, 

1)I created the association

 

 

 

2)I created the microflow which I have tested and it seems to work fine

 

 

3)I used this microflow in data view

 

 

4)I created another dataview  within the above dataview, but even before applying the xpath constraint , I do not get any result within this dataview.

 

Although I have records pending with my ID there are no results in internal dataview .

 

This is what my page looks like:

What could be the problem?

 

Regards

Manas

 

 

 

answered
0

Hi Ivo,

We have added the data grid too within data view just to debug.

Below is a screenshot of setting data source via xpath.

 

By this approach,we do not get any result in datagrid .

 

 

 

 

 

In second approach,if I directly select the workflow entity(offer_header) and find the user name via association to account in column output.

 

Column Name should have  the value of “User name “ via association.

 

But in result, we do not have any output in corresponding name column.

 

 

Please help.

 

Regards

Manas

 

answered