How to configure alert message if an option is chosen from a dropdown list

Hi all,

I was wondering if anyone could guide me in configuring help text/messages when a data capturer selects a certain option from an option set in a program stage like in the image below.
image

Thanks in advance.

Hi @fernando.

When you have a question about Android tagging it as such is a good idea so we can provide quicker support (I have added it for you).

Regarding your question, you should implement a Program Rule which condition is based on the Data Element you want to evaluate and which action should be “Show Warning”. Like this:

Hi, @jaime.bosque. Thank you.

Following your instruction, I was able to implement a program rule and it is working. I have another question: In a repeatable Is it possible to show a selected option from a data element on the individual’s dashboard so I can cross check what’s happening.

For example, in the image above, if in the first rastreio the selected value is green, in the second rastreio, I would like to show green, which would be the previous value, on the dashboard.
If in the second rastreio the selected value is yellow, in the third rastreio, I would like to show yellow on the dashboard and so on.

Thank you again

Hi @fernando

This is achievable via a Program Rule Variable. You should create a PRV which value comes from a previous event (to your choice), like:

Then you should evaluate that PRV in a new Program Rule condition and assign in the Program Rule Action the value you want: Green, Yellow, Red

Hi @jaime.bosque,

Sorry for taking so long to respond. Iam having difficulty creating a program rule. Creating a PRV is easy. What should I put in the condition and action so that each previous value is visible n every rastreio?

image


Thanks

I am not sure what you are trying to achieve, but assuming you have the value carried over via the PRV and you want to show it you could:

Create a program rule with:

  1. Program rule expression like d2:hasValue(#{your_variable}) or program rule expression True (this is a way to have it always executed)
    2.Program rule action like assign value from the PRV to a specific data element, in case you want to show it in a field box. Or show warning or show error and select the Data Element next to the one where you want to show the message. Or display text and the widget.

Cheers.

Hi @jaime.bosque,

As I said, I have a repeatable stage that has a data element with an option set attached to it.
image.

The aim is to view the previous selected value (colour) each time a stage is filled. This is what I want to achieve.

Thanks

Have you tried the steps described? You should be able to achieve it following them.