Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

GetFormsInfo doesn't return all forms

Vote:
 

We run a scheduled task (running from episerver) that loops through all available forms in our episerver instance and exports any submissions that have been made since the last time the scheduled task was run (every 24 hours).

To get the the available forms we run

var formsInfo = _formRepository.GetFormsInfo(null);

foreach (var formInfo in formsInfo)
{

// check if the form has data, do something with data

}

where _formRepository is an instance of EPiServer.Forms.Core.IFormRepository.

Recently a user has created a form that does not get picked up by the GetFormsInfo method.

What (if anything) stops a form being picked up by this method? 

#217038
Feb 13, 2020 13:51
Vote:
 

The form should be in the "EPiServer Forms" folder since the API only find form in there. Could you check again with that?

#217052
Feb 14, 2020 6:40
Vote:
 

The form is in the Forms folder with all our other forms which get picked up by the method.  Could it be anything to do with permissions or access rights to the form as I've noticed that not all users can see the form (in the forms folder) so was wondering if the api only picks up forms with specific rights?

#217056
Feb 14, 2020 8:51
Vote:
 

Yes, at least you need to have "Read" permission to get the form information. Here is how it filter:

new FilterAccess(AccessLevel.Read).Filter(listOfFormContainerBlock);
#217058
Edited, Feb 14, 2020 8:56
Vote:
 

Ok, would the scheduled job run under the admin user as I know that user can see the Form and manually extract the data

#217060
Feb 14, 2020 9:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.