Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Calculated field based on ID

  Asked By: Teddy    Date: Apr 05    Category: Sharepoint    Views: 12124

I need some suggestions. I have -- as stated -- a calculated field that
uses the ID field to come up with a composite value. The problem is that
when the item is created, the ID value shows up as 00; even upon subsequent
edits, the ID portion of the result stays 00 until I go into the field
definition and save it again; then all the fields recalculate.

Obviously I'm missing something crucial here. I get that the ID doesn't
exist when the item is created, but why doesn't the calculated field update
when the ID changes to something?

Share: 

 

6 Answers Found

 
Answer #1    Answered By: Alexia Mccarty     Answered On: Apr 05

Calculated fields  don't always calculate as you noticed...a way around it is to
create a workflow triggered on the creation of the item. The workflow can
update something causing the subsequent save  which (I think) will cause the
calculation to occur.

 
Answer #2    Answered By: Laquita Mcgowan     Answered On: Apr 05

Yeah, that's kind of where I was headed (i.e. hoping to avoid). Thanks for
the confirmation.

 
Answer #3    Answered By: Elijah Davis     Answered On: Apr 05

I was just taking a look at something along those lines:

rapidapplicationdevelopment.blogspot.com/.../making-sharepoint-title-\
calculated.html

 
Answer #4    Answered By: Akanksha Jain     Answered On: Apr 05

I don't see the connection to the availability
of the ID in a newly-created row; can you help?

An update: I tried using a workflow to update a relevant field  in the
new item. Not only did it have no effect on the calculated  field, but I
also discovered that the ID is available from the very beginning of the
workflow. Maybe I should just set the field through workflow rather than
making it calculated.

 
Answer #5    Answered By: Bhupendra Borkar     Answered On: Apr 05

It makes sense that the ID is available from the beginning as the WF doesn't
kick off until the item  is added.

As I said the link was along the same lines; I only hoped to add some helpful
ideas to your process .

 
Answer #6    Answered By: Shobhana R.     Answered On: Apr 05

Well, thanks for thinking of me anyway.

It's a bit frustrating in that the ID is available to the workflow, but all
the really useful parsing stuff can only be done in a calculated  field.

Just to finish this off... I ended up creating a separate field  (that I will
hide in all data forms) that the workflow will fill with the ID value. The
extra field will be used in the calculation, and since it gets changed after
creation, the calculated field updates properly as well.

 
Didn't find what you were looking for? Find more on Calculated field based on ID Or get search suggestion and latest updates.




Tagged: