Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Hi I'm working on a workflow and I'm trying to set a field in the current item to a value calculated. Im trying to do this:

Calculate Current Item:GP Instance Run Count plus 1 (output to Variable: temp)
then Set GP Instance Run Count to Variable: temp

But in the drop down menu of the set action the field GP Instance Run Count doesn't show up. This is not the first time SPD does this. It sometimes hides random fields, and I don't know what to do...

Screenshot of SPD problem

You can see int the image above that I was able to access GP Instance Run Count in the previous action

share|improve this question
    
How is GP Instance Run Count defined? –  Per Jakobsen Jun 5 '12 at 8:52
    
I guess you took step "Set Field in Current Item This action is initially displayed in a workflow step as Set filed to value Use the action to set a field in the current item to a value." Because: The Set Field in Current Item action is not available when you are working in a site workflow. (Source: office.microsoft.com/en-us/sharepoint-designer-help/…) –  Shegit Brahm Jun 5 '12 at 8:54
    
Maybe you should use Update item in list ? –  Shegit Brahm Jun 5 '12 at 8:55
    
GP... was declared as a number site column and then added to a new content type. @Shegit I'm sorry but I did not understand your first comment, even using Update item in list doesn't show the GP... field –  MaurizioPz Jun 5 '12 at 10:10
    
I see that a site workflow might not work on a list, so there could be no effect because of using in a site workflow –  Shegit Brahm Jun 5 '12 at 11:58
add comment

5 Answers 5

I had the same issue and the only way I was able to fix was to make sure the site column GP Instance Run Count was added to the list. I then exited out of Designer and reconnected again. GP Instance Run Count was in the list then.

share|improve this answer
add comment

One thing that always work for me though is to set the number of decimal places, to say 0 instead of automatic and specify a default value, e.g. 0.
For existing site columns in site content types, you'll have to remove and add again for it to reflect.

share|improve this answer
    
to say I actually searched in hope of a better solution... –  keni Oct 27 '12 at 14:40
add comment

This sounds like an example from the book Professional Workflow in SharePoint 2010 by Galvin and Ethirajulu (Wrox, 2012).

The authors instruct the reader to set the GP Instance Run Count field to be hidden as it is a Technical site column. This, I've found, makes the field no longer available for the Set Field in Current Item Action in the workflow.

To work around this, I had to make the Technical fields visible and optional and instead rely on the views to hide them. What to do about the forms, however, is still a mystery.

share|improve this answer
    
For the forms, I wound up using Javascript (jQuery to be specific) in order to hide the technical fields when the forms load. I reorder the columns to place the technical columns at the bottom so they appear below the fold so that once they are hidden, the user experience is hardly affected. –  Draghon Sep 26 '13 at 12:16
add comment

If you look at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\Workflow\WSS.ACTIONS" you see that:

The Do Calculation action specifies that parameter 1 has DesignerType="Textbox" which allows almost anything.

The Set Field in Current Item action specifies that parameter 1 has DesignerType="WritableFieldNames" which allows "List that contains all fields in the list or document library with which the workflow is associated that are not read-only, or a list of all document libraries on the current site that are not read-only, depending on the context."

So apparently SharePoint designer has figured out that "GP Instance Run Count" is read-only.

share|improve this answer
    
I see no apparent reason why "GP Instance Run Count" should be readonly. How should I check if it is, and then how do I change it to writeable –  MaurizioPz Jun 5 '12 at 10:10
add comment
up vote 0 down vote accepted

It looks like I've found the problem. The column of GP Instance Run Count was in the content type, but not in the list I'm working on which uses that content type

share|improve this answer
    
And how did you solve it? I mean, did you find a way (and which) to use it? –  Shegit Brahm Jun 5 '12 at 12:01
    
I simply added the site column to the list –  MaurizioPz Jun 6 '12 at 10:53
    
I've got the same problem as described above. I tried to add GP Instance Run Count to the list and it says it is already there. But it doesn't show up as a column in the list. Any ideas what could be causing that? I know it is associated to a different site column group, but I don't think that shouldn't matter. But I really don't know. Any help would be appreciated. –  user11293 Oct 11 '12 at 18:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.