Can anyone explain why the followng code does not work as I would like it to. I am trying to display a message one time with @Prompt. The code is in a computed text field.
Question is, when do you expect the prompt box to appear?
As per your code, this will only happen, if a pair-wise comparision of FixedPricingYears1 and your list returns true. If FixedPricingYears1 contains one value only, this should work as expected. If it can contain multiple values, and any match should be sufficient to display the prompt box, then change your if condition to
The code that you see works correctly. There are no issues with it.
All I want to do is display the @prompt message one time if the condition is met. The formula is working correctly. However, the formula will continuously display the @prompt message every time a user tries to enter data in other fields.
First off, why have a loop at all? It’s only being run once.
Secondly, what are the possible ranges of FixedPricingYears1?
That selection criteria should be simplified if possible.
e.g. @If(@Contains(FixedPricingYears1; " years"); …
Thirdly, if you have problems with the @Prompt within the @If, or if you would rather have the code laid out in an easier-to-read form, consider using the negative check to escape the formula,
i.e.
@If( ! @Contains(FixedPricingYears1; " years");
@Return(“”); “”);
@Prompt([Ok]; “CMS Reminder” ; “This Conract must be signed per (DSA) Policy”);
However, your focusing on issues that I am not concerned with.
All I want to do is display the @prompt message one time if the condition is met. The formula is working correctly. However, the formula will continuously display the @prompt message every time a user tries to enter data in other fields.