Dear,
There is one idea that might help , which is the following
i see that you are creating a record for each step , with same request id and different entity number .
is there a way for you to hold the last entity number into a data field ? workflow data field that is changed when ever a new entity is submitted ?
and for the consultation form , just use this data field to filter the request id + entity number from data field holding it.
Hope it helps!
Regards.
If the SMO will be always sorted in the way you expect and the last record is the record of interest... you can do the following.
Create a Param (integer) to use as counter Total of Records => Initial 0
Create a Param (integer) to use as counter Current Record ( Second Loop ) = Initial 0
Create a Expression that increases Total of records by 1 this counter.
Create a Expression that increases Current of records by 1 this counter.
With Oubtound Rule
Initialize param Total of records to 0 just to make sure...
1) Run a for each loop to count all the records in the SMO
Execute the Expresion to increase Total of Records
Create a For Each Rule to loop all the items in the SMO for each time passes you execute the expression c At the end will have the number of records in the counter ]
With Another Oubtound Rule
Initialize param Current record to 0 just to make sure...
2) Run Another for each loop and
Execute the Expression to increase Current of records
Advance Conditional to match if Current Request is equal to Total of records.
If is ... do whatever with your data fields from SMO....
So running 2 loops will do the trick. suggest to do it with outbound rules.
Hope this helps.
Dino.
Thank you so much for your answers.
I did what Ahmad Abdullah advised and it worked.
In the workflow I stored in a data field the value from entity number and, in the form, reading the data field, I was able to add a rule to set the form as read-only to the users that don't have permissions.