I need to create a Custom Field that contains a formula to calculate a date based off some conditions.
Is this possible and how do I achieve it?
Thanks,
I need to create a Custom Field that contains a formula to calculate a date based off some conditions.
Is this possible and how do I achieve it?
Thanks,
Hi lisa.
Yes, it is possible. For Apps10 you should follow this steps:
https://docs.ifs.com/techdocs/foundation1/040_administration/220_user_interface/020_custom_objects/040_custom_fields/020_create_custom_fields/default.htm
Step by step for Read-Only fields:
https://docs.ifs.com/techdocs/foundation1/040_administration/220_user_interface/020_custom_objects/040_custom_fields/020_create_custom_fields/steps_itd/set_TypeOfField_ReadOnly.htm?nobanner=true
Implementation type should be: “Select”. That way you can use SQL to describe the business logic for that Date field you need.
Thank you much.
Best regards.
Gonzalo.
Thanks for the reply but I am still struggling with the SQL and Argument methods.
I need an ‘If And’ statement with using 2 CF Fields already created and the Create Date from the Case
Example:
if cf$_criticality = ‘Critical’ and cf$_Type ‘Breakdown’ then create_date + 12 h else
if cf$_criticalty = ‘non-crit’ and cf$_Type ‘Breakdown’ then create_date +48 else
if cf$_criticality = ‘Critical’ and cf$_Type ‘damage’ then create_date + 48 h else
if cf$_criticalty = ‘non-crit’ and cf$_Type ‘damage’ then create_date +120h
how would I present that as a Custom Field?
Use the CASE statement in your SELECT statement for your read-only custom field, it behaves like an IF statement.
For example.
SELECT
CASE
WHEN :cf$_criticality = ‘Critical’ AND :cf$_type = ‘Breakdown’ THEN :create_date + (12/24)
WHEN :cf$_criticalty = ‘non-crit’ AND :cf$_type = ‘Breakdown’ THEN :create_date + (48/24)
END
FROM DUAL
The arguments would be something like.
t.cf$_criticality, t.cf$_type, v.create_date
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.