문제

I am new to SharePoint.

I am looking for a way to assign a value for a column depending on another column's value. For example, the choice column dictates "New York" the value of the calculated column would display "Person1," and there are also more choices like "Florida" and the column should write "Person2".

What is the exact formula for this?

Thanks!

도움이 되었습니까?

해결책

Try using below formula:

=IF([ChoiceField]="New York","Person1",IF([ChoiceField]="Florida","Person2",[ChoiceField]))

This formula is similar to:

if(ChoiceField === "New York") {
    CalculatedValue = "Person1";
} else if(ChoiceField === "Florida") {
    CalculatedValue = "Person2";
} else {
    CalculatedValue = ChoiceField;
}

IF Function:

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. Use IF to conduct conditional tests on values and formulas.

Syntax:

IF(logical_test,value_if_true,value_if_false)

Remarks:

Up to seven IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests.

Reference:

IF function.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top