Hi,
i have a question about calculated fields.
Use Case is: We'd like to cluster living-areas.
Therefore i need something like a calculated field thats selects for example Reagion1 if the zipcode in the linked field/module starts with 3.
Thanks!
Hi,
i have a question about calculated fields.
Use Case is: We'd like to cluster living-areas.
Therefore i need something like a calculated field thats selects for example Reagion1 if the zipcode in the linked field/module starts with 3.
Thanks!
You can use the SugarLogic function subStr(string, star, leng).
So, as per your scenario, we have:
ifElse(
equal(subStr($some_field, 0, 1), "3"),
// do something
// do something else
)
Regards
Hey,
thanks for the reply.
So i tried it and i use the following formular
ifElse(
isWithinRange(rollupSum($zipcode_short_c,"amount"),01,09),
"Sachsen",
ifElse(
isWithinRange(rollupSum($zipcode_short_c,"amount"),10,19),
"Brandenburg",
ifElse(
isWithinRange(rollupSum($zipcode_short_c,"amount"),20,29),
"Hamburg",
ifElse(
greaterThan(rollupSum($zipcode_short_c,"amount"),30),
"keine Region",
"0"
)
)
)
)
But there is a error:
Ungültige Formel
"Unexpected token I in JSON at position 0"
Any suggestions?
Thanks!
Hey,
thanks for the reply.
So i tried it and i use the following formular
ifElse(
isWithinRange(rollupSum($zipcode_short_c,"amount"),01,09),
"Sachsen",
ifElse(
isWithinRange(rollupSum($zipcode_short_c,"amount"),10,19),
"Brandenburg",
ifElse(
isWithinRange(rollupSum($zipcode_short_c,"amount"),20,29),
"Hamburg",
ifElse(
greaterThan(rollupSum($zipcode_short_c,"amount"),30),
"keine Region",
"0"
)
)
)
)
But there is a error:
Ungültige Formel
"Unexpected token I in JSON at position 0"
Any suggestions?
Thanks!
I got this working formula in my dev instance:
ifElse(
isWithinRange(rollupSum($opportunities, "amount"), 1 ,9),
"Sachsen",
ifElse(
isWithinRange(rollupSum($opportunities, "amount"), 10, 19),
"Brandenburg",
ifElse(
isWithinRange(rollupSum($opportunities, "amount"), 20, 29),
"Hamburg",
ifElse(
greaterThan(rollupSum($opportunities, "amount"), 30),
"keine Region",
"0"
)
)
)
)
You just need to replace the link name at the rollupSum formula.
Regards