Skip to main content
Nintex Community Menu Bar

Error publishing workflow.

  • Aug 19, 2022 4:36 PM UTC
  • 7 replies
  • 438 views
  • Translate All

Underdog

Hello Everyone,

I'm setting up a simple, simple flow .. shown below.

 

25299iCE37E80B5A8CE351.png

 

When I try to publish it, I get this message:

Error publishing workflow. Unable to cast object of type 'System.Activities.InArgument`1[System.String]' to type 'System.Activities.InArgument`1[Microsoft.Activities.DynamicValue]'.

 

25300i5630429A13FE5A1A.png

Is it because I'm out of memory or something else? .. syntax? .. configuration?

 

Thoughts?

Thanks!

 

 

 

 

7 replies

bamaeric
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • Aug 19, 2022 5:58 PM UTC

This message usually points to a data type mismatch. What type of field is the "Portfolio - Choice" field?

 

Check out this post to see if it helps: Solved: Error Publishing Workflow - Nintex Community

Translate

Underdog
  • Author
  • Aug 19, 2022 6:00 PM UTC
Ok. Let me check that link out. Thanks!
Translate

bamaeric
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • Aug 19, 2022 6:31 PM UTC

I'm guessing the "Portfolio - Choice" field is a multi-select field. The results of a multi-select field are stored in a collection. So the equals configuration in the Run If won't work and causes the error.

 

Try adding a "Set Variable Value" action before the Run If action. Configure the "Set Variable Value" action by creating a text variable and setting the Value to the "Portfolio - Choice" field. Then configure the Run If expression with the "contains" operator and the workflow variable.

 

Translate

Underdog
  • Author
  • Aug 19, 2022 7:19 PM UTC

Yes.  You're correct about the multi-choice column.  I'll look at your suggestion now.  I've have a feeling you're right on.

 

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Aug 19, 2022 7:29 PM UTC

Hi @Underdog 

 

Just to comment on the coding structure. Use a For-Each loop to process the value from your multi-select Choice control

 

Translate

Underdog
  • Author
  • Aug 22, 2022 8:19 PM UTC

Hi @bamaeric,

I thought I'd develop on your line of thinking while I await Garrett's additional input (Garrett, btw, has been unbelievably helpful).

 

So .. just to reiterate, the SPO Column "Portfolio Choice" is a multiple selection column.  You were correct.  As advised, I've established 13 variables and have set the variables (right away) in a "Set Variable" Control.  See below:

 

(this is the first, second & third variables in the flow - the other 10 having the same logic)

 

Next, I established a Switch, with the 13 Departments listed in the Switch.  (Something tells me this may not be the right next step.)

 

Thus, looking like this below, referencing "Portfolio Choice" and listing the 13 Departments (exactly copied from the SPO Column List).

 

Followed by a "Run If" Control, then a "Send E-mail" Control.  Conceptually, am I correct in my flow set up and details within each Control?

Thanks!

 

 

 

 

 

 

 

a

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Aug 23, 2022 12:28 AM UTC

Hi @Underdog 

 

1. The Switch will evaluate one path. The first correct path will end the flow. so your program will only send 1 email and <END>.

2. Better to replace the Switch with a Parallel Block.

Translate