Skip to Content

Difference between Calculated Field and Assignment

Hey Guys,

What is the main difference between Calculated field and Assignment? Under what conditions we will use them?

The editor for both of them looks the same to me.

I saw one difference that some fields are disabled in the editor for Calculated field but all fields are enabled in Assignment, why those fields are disabled in Calculated field editor?

Thanks

Saif

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 03, 2010 at 09:24 AM

    Hi Saif,

    Calculate / assignment fields are used in different scenarios.

    Calculate:

    This field gets updated based on the expression you defined in Console, when ever a new record is created via Import Manager or Data Manager. Also it get updated when the repository is loaded. But other wise manually, if you go to DM -> Right click -> Recalculate. Recalculation cannot be done via workflow.

    Its read only in Data manager. Can be changed only when Repository is unloaded

    Assignment:

    I find it more flexible than calculate field.

    Theonly way to execute a Assignment is to either do it manually or declare it in your workflow stencil "Assign" to assign the value automatically in the field. This does not get populated automatically as in case of Calculated field, when a new record is added.

    Can be changed in Data Manager. Its not read only.

    The use would be more based on how your requirement is.

    I would go for Calculate, when I dont want to recalculate a field again and again.

    In case i need to change the field value based on the other field value and need to check and assign in run time, I will use the assignment field as part of workflow.

    Wrt to Expressions, that a very good point you made regarding Multilingual. I was not aware of it. But otherwise, I dont tihnk there is much difference.

    Useful article:

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/102dc4e5-07c9-2910-93b3-f49c8ed52509?quicklink=index&overridelayout=true

    Thanks,

    Priti

    Edited by: Priti Rani Patnaik on Jun 3, 2010 4:14 PM

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 03, 2010 at 02:06 AM

    >>why those fields are disabled in Calculated field editor?

    I have found the answer for this, Multilingual fields are disabled in Calculated field editor but they are enabled in Assignment editor.

    Now i just need to know when to use Calculated field and when to use Assignment.

    Thanks

    Saif

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Saif,

      If your req is F3 = F1+F2 ; you can make F3 as calculated. This will assign value when the record is imported. But if the values change, it will not get updated at run time. You need to manually select "ReCalculate".

      The assignment method in workflow would fit in here.

      For Automatically assigning the F3 value at runtime, you need to have a workflow which will execute the assignment. No user intervention would be required.

      In Assignment tab-> Assignment field: F3

      START -> ASSIGN -> STOP

      Trigger action: Add / Update

      Thanks,

      Priti

  • Jun 07, 2010 at 02:50 AM

    Thanks everybody,

    It helps solve my problem.

    Thanks

    Saif

    Add comment
    10|10000 characters needed characters exceeded