Question

Photo of Knolly Shadrache

0

Person Attribute From Fields is throwing a validation Error?

Hi,

I'm experimenting with persisting an external enquiry to a person record  but it isn't working so far. Like a few other people on the Rock Forums, my aim is to do follow-up with enquirers.

I'm following the guide, populating the fields with {{ Workflow.FirstName }}, {{ Workflow.LastName }}, {{ Workflow.Email }} but getting a validation error but no idea what is failing or how to trace it down beyond the error message below. Can someone shed light on why this is happening and what I can do about it please?

Error Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. at System.Data.Entity.Internal.InternalContext.SaveChanges() at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing) at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing) at Rock.Model.GroupService.SaveNewGroup(RockContext rockContext, Int32 groupTypeId, Nullable`1 parentGroupGuid, String groupName, List`1 groupMembers, Nullable`1 campusId, Boolean savePersonAttributes) at Rock.Model.GroupService.SaveNewFamily(RockContext rockContext, List`1 familyMembers, Nullable`1 campusId, Boolean savePersonAttributes) at Rock.Model.PersonService.SaveNewPerson(Person person, RockContext rockContext, Nullable`1 campusId, Boolean savePersonAttributes) at Rock.Workflow.Action.GetPersonFromFields.Execute(RockContext rockContext, WorkflowAction action, Object entity, List`1& errorMessages) at Rock.Model.WorkflowAction.Process(RockContext rockContext, Object entity, List`1& errorMessages) at Rock.Model.WorkflowActivity.Process(RockContext rockContext, Object entity, List`1& errorMessages) at Rock.Model.Workflow.ProcessActivity(RockContext rockContext, DateTime processStartTime, Object entity, List`1& errorMessages) at Rock.Model.Workflow.ProcessActivities(RockContext rockContext, Object entity, List`1& errorMessages) at Rock.Model.WorkflowService.Process(Workflow workflow, Object entity, List`1& errorMessages) at RockWeb.Blocks.WorkFlow.WorkflowEntry.CompleteFormAction(String formAction) in c:\inetpub\wwwroot\Blocks\WorkFlow\WorkflowEntry.ascx.cs:line 757 at RockWeb.Blocks.WorkFlow.WorkflowEntry.RaisePostBackEvent(String eventArgument) in c:\inetpub\wwwroot\Blocks\WorkFlow\WorkflowEntry.ascx.cs:line 235 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


If I can get this to work, ideally I'd like all people assigned to do followup to have access to a simple list of people assigned to them in their dashboard.


Hope you can help


Every Blessing


Knolly

  • Photo of Knolly Shadrache

    0

    Wow that was a quick response..!!

  • Photo of Knolly Shadrache

    0

    I've copied the External Enquiry workflow on the live demo and just added an action to add person from fields

    Screenshot from 2017-04-27 23-59-39.png

  • Photo of Daniel Hazelbaker

    0

    Gotcha. Okay based on the screenshot, you have defined Attributes in the Workflow of FirstName, LastName and Email. Instead of putting in {{ Workflow.FirstName }} in this case you will want to select those attributes from the drop-downs to the right and then blank out the fields on the left.

  • Photo of Daniel Hazelbaker

    0

    It should look like this, is what I mean:


  • Photo of Knolly Shadrache

    0

    Fantastic!! it worked!.

    Out of interest, when would you use {{ lava }}?