cancel
Showing results for 
Search instead for 
Did you mean: 

Repeating section in email body or perhaps multi instance keywords

Jan_Struwig1
Confirmed Champ
Confirmed Champ

Good day, is it possible to include a repeating section for part of a Unity form in the body of an email notification? Or perhaps all the multi instance keywords in the same formatting as the repeating section. We have a repeating section that needs to be reviewed by an approver but need a way for the approver to have quick visibility in his email body on what he/she needs to approve before connecting to workflow.

4 REPLIES 4

Steven_Applegar
Confirmed Champ
Confirmed Champ

Edited because I didn't see in the last sentence that it is in fact going into a workflow.

 

I've been able to do this using a workflow script to loop through all records for the MIKG type and putting them in a property that is then used in the email body. You could have the script run and send the email as soon as the form hits the workflow, so the user can see what's waiting for them in their queue.

 

I'm sure you could do something similar with repeating sections that aren't tied to keywords as well, but I haven't tried that. 

 

//MIKG Example//string to hold the value that we'll assign to the property. I find it useful to have it in a list in the emailstring textHolder = "<ul>";//Get KW Record TypeKeywordRecordType mikgRecordType = app.Core.KeywordRecordTypes.Find("mikgName");//Create list of all records in the document of that KW Record TypeKeywordRecordList mikgRecordList = args.Document.KeywordRecords.FindAll(mikgRecordType);//loop through KW recordsforeach(KeywordRecord kr in mikgRecordList){    //find the keywords you want in the keyword record and add them to the textHolder string. I've only included one here, but you could do as many as you wanted.    Keyword desiredKW = kr.Keywords.Find("desiredKWName");    //append the text you want to the textHolder string    textHolder = textHolder + "<li>" + desiredKW.AlphaNumericValue + "</li>";}//Once you've finished looping through the KW records, end the listtextHolder = textHolder +"</ul>";//Set the property value.args.PropertyBag.Set("propertyName", textHolder); 

Larissa_Armand
Elite Collaborator
Elite Collaborator

@Jan Struwig 

 

I posted this idea requesting better functionality for inserting MIKG records into a notification: 

 

https://community.hyland.com/ideas/idea/81405-add-option-to-insert-token-s-for-formatted-mikg-in-wor...

 

You can also set a property from MIKG records without a script, but there are some challenges in doing so outlined in that idea (the worst part is the handling of null values). 

Steven_Applegar
Confirmed Champ
Confirmed Champ

I honestly forgot about that option, which is much easier if there aren't going to be any null values

Jan_Struwig1
Confirmed Champ
Confirmed Champ

@LARISSA ARMAND, @Steven Applegarth , thank you both for your suggestions, really appreciate it. Will look at both options.