Skip to main content

Hi!

 

Is there a way to show and consult the "last row" of a smartobject?

 

We have a smartobject that has a request ID and an entity number. When a task is transfered the request ID is the same but the entity number is increased.

For example, request ID: 123456789 and entity number: 1; request ID: 123456789 and entity number: 2.... The user that has the task is also stored in the smartobject.

 

What we want to do is to consult only the last row when the form is initializing so that we can add another rule. If in the last row the user that I transfered the task is not the same that is opening the form, the form must be read-only. This is to prevent the edition of the form from persons that mustn't have access, as the task is not delegated to them.

 

Thanks in advance.

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.

 


Reply