November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi,
Depending on what you wanted to do with the forms when you've found them, you could just treat them the same way as any other piece of content. Rather than using IFormRepository, you could perhaps get all instances of "FormContainerBlock" and filter them by creator (which is a property of IChangeTrackable) like this:
var contentModelUsage = ServiceLocator.Current.GetInstance<IContentModelUsage>();
var contentTypeRepo = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var templateType = contentTypeRepo.Load("FormContainerBlock");
var allForms = contentModelUsage.ListContentOfContentType(templateType).Select(x => contentLoader.Get<IContentData>(x.ContentLink, new CultureInfo(x.LanguageBranch)));
var bobsForms = allForms.Where(x => (x as IChangeTrackable).CreatedBy.Equals("Bob"));
Hi!
I need to get alla forms in the system created by a specific user.
Right now I am using "IFormRepository" and getting all the forms with "GetFormsInfo()", this returns all the forms in the system but I need all forms created by a specific user.
Is there a way to do this?
The data returned by "GetFormsInfo()" does not contain any info about which user created the form.