How to Dynamically Display Values in an Input's "Initial Content" Based on User Responses?

I’m developing an application in Bubble and have a table called “Probability” with the following columns:

  • Option (Yes/No)
  • Probability (Medium, High, Critical)
  • Response (Description of the case)
  • Weight (1, 2, 5)

I have 5 questions displayed to the user, each linked to the descriptions in the table above. For each question, the user can answer “Yes” or “No”.

My challenge is to dynamically display the corresponding value from the “Probability” column in an Input field (using the “Initial Content”) based on the user’s answers and the table data.

Business Rules:

  1. If any of the responses with weight 5 is “Yes”, the probability should be “Critical”, regardless of the other responses.
  2. If none of the responses with weight 5 is “Yes”, but the one with weight 2 is “Yes”, the probability should be “High”, regardless of the others.
  3. If none of the responses with weight 5 or weight 2 is “Yes”, but the one with weight 1 is “Yes”, the probability should be “Medium”, regardless of the others.
  4. If all responses are “No”, the probability field should remain empty or display a default value (depending on the setup).

My Question:
How can I configure this logic in Bubble so that the Initial Content of an Input field correctly displays the probability based on these rules and the user’s responses? Should I use workflows, conditional expressions, or another feature?

In the inputs below I will enter yes or no.

based on this I want to display the risk column, in the initial content of my input

that is, if the weight is 5, display critical.

if it is 2, display High.

Did you understand?

@iwakinomotoye can u help me?

hi @davi.simao add conditional expressions on the input to set it’s initial content.

Let us assume dropdown 1 is for the first row of the probability table and dropdown 2 is for the second row of the probability table, etc…

condition 1: dropdown 3 value is yes or dropdown 4 value is yes or dropdown 5 value is yes - then the initial content should be critical
condition 2: dropdown 2 value is yes and dropdown 3 value is no and dropdown 4 value is no and dropdown 5 value is no - then the initial content should be high
condition 3: dropdown 2 value is no and dropdown 3 value is no and dropdown 4 value is no and dropdown 5 value is no and dropdown 1 value is yes - the initial content should be medium
condition 4: you dont need to set any condition for this. just make the input initial content empty.

Let me know if it works for you.

This helped me a lot!

Thanks again brother!

But I wanted to know if I could do the same, for a repetitive group.

For example:

I create a form so the user can create questions, and they appear on the front, for them to answer.

Could I do this?

Tell me if it was clear to you.

you mean if you could use the initial content conditional logic inside a repeatinggroup?

If that is what you mean: yes you can.

Will each question’s answer dropdown exist in different cell of the repeatinggroup?

If yes, then this can get a little bit more trickier. easiest way to assess the dropdown value in each row would be to use plugin “Input RG Values ・BEP”

Let me know if this is not what you want. @davi.simao