I am creating a workflow at the moment with nintex 2013.
In my library are multiple items filled in from different users. Most of the fields/columns are of the type choice. The users assess a document and that should be easy and fast so I thought 'choice' is the best way to do it.
The workflow is calculating a mean value and should fill in the new value in the right field in the 'Concluion item'.
I get the error Coercion Failed: Unable to transform the input lookup data into the requested type.
so it obviously doesn't work (even though the calculated result is one of the choices).
Is there a workaround? Is the 'update item' and fill into the field 'choice' process even possible?
can you put some screenshots of what you are trying to achieve please? that will allow me to mock up a replica and hopefully help you solve the issue.
If you're doing a calculation, that implies a numeric result. However choice fields are stored as string values. You may need to check your calculation is coming up with a valid result (i.e. if your choices are 20,40,60..., make sure the number isn't calculated as 19.7, then convert the value to a string before assigning it to the field value.
Are you using a SharePoint form? If so, here is a piece of advice. It is not advisable to use choices unless they are yes/no. Lookup fields are preferable. The reason is, if you rename the choice fields you will still have those old choices with the old name and then get choices with the new name. You will not have good data. Where as a lookup uses the index of the value. That never changes. So if you change the name, it won't matter it will be same for all items using that selection. I know this wasn't part of your question but it would make your problem go away.
It's a bit more complicated than that (with Sharepoint it usually is).
Using a lookup is robust to some changes. If you modify the value of an item at a certain ID in the lookup list, all the references pointing to that lookup value (by ID) will change their value, which may well be what you want in some circumstances, not in others.
However, if you delete an item in the lookup list, and/or replace it with a new value at a new ID, you will still end up with broken historic values in your "client" lists, so it's not that much better than the choice if a lot of changes are happening.
Sharepoint also doesn't support applying column default values for lookup fields out of the box, whereas it does for choice fields. You can work around this using a custom form and/or applying a default post-submission in a workflow, but it's one of the many annoying inconsistencies in Sharepoint's handling of different field types.
I thought about changing it to a lookup filed but wasn't sure. I tried it for one column, but I came across two problems
1. you can just select a library and no condition so that you would have to create a library for each column (is there another way?)
2. the choices you can pick from are not in the right order (e.g. low high medium instead of low medium high)
Am I wrong with those two points? I am still not sure if I should change choice to lookup. I have 7 columns with choice/lookup and if I want to change some things in a few months I don't want the whole items to be broken. :/
I'm confused. I thought i'd already replied to Nina's last comment, but here goes again...
That would mean maintaining a user-friendly "sensible" order when items are changed might mean artifically deleting and re-adding rows to get them in the right order
you can define view(s) on sharepoint list and configure lookup control to use one of defined views.
using views you can effectively sort and/or filter which items and in what order are populated into lookup control