Skip to main content

Hi K2 expert,

I have a value from DB, the value format as  "Andy,Kaier,John,Yu,Shown,Face" or more

I have tried to use split(',') function to segment letters but there is no for loop function to add hyperlink in each value.

How do I implement this kind of function in the signer stage of workflow.

Thanks

Requestor

Andy

Group

Andy Group

Description

test for group

Reviewer

Andy,Kaier,John,Yu,Shown,Face

There is no function that can allow you to do this. Easiest way I can think of is to find a way to directly return the hyperlinks list from a SmartObject call.


 


Alternatively you can make use of the loop step to loop through the results from a SmartObject, piece together the different parts you need into a html formated text body, then use that formated text in your email.


 


Hi @boringNerd,
I didn't get your point what's loop step to loop through the results from a SmartObject?
The data format as "Andy,Kaier,John,Yu,Shown,Face".
I have no idea how to loop it by SmartObject. Could you expain in detail?
Thanks for the reply.

If your SmartObject returns a list of records, you can make use of the loop step to loop through each records, and do something on each iteration. Of course this only works if you have a SmartObject that retrieves all the different values you want in a list.


 


Another way is to come up with some sort of SmartObject that accepts a string of values, then return back with something you want. You can write your own helper assembly that performs this, and use the Endpoint Assembly service. Or if you are familiar with web services, come up with your own web service that performs the same function, then create SmartObjects from the web service. 


 


 


Hi  @boringNerd 

Unfortunately, the data is multiple (Andy, BoringNerd, Shawn, Lize) in one field.

So I can't separate the data by the loop step function.

Thanks for your help.


You can get around this. Create a stored procedure that queries the record you want, and in that stored procedure, split the string into multiple rows and return the results. You can create a SmartObject that executes that stored procedure, then use it in the loop step.


 


Reply