Inserting a value based on total score

I have something that should be so easy but I can't seem to find a Wappler way to accomplish it.

I have a table with two columns (client_align_score, client_align_rank). What I need to do is if the score from the form is between 85-100, enter an R1 value in the rank, if the value is between 70-85, I need to enter R2, etc all the way to R5.

There must be a way to do this that I can't see. I tried using the condition attribute in the form insert server connect, but that only allows for one value. I can't add the same column more than once in the insert step.

I tried using a hidden input in the form but also couldn't assign dynamic values.

Any help would be appreciated. Thank you.

I accomplished by doing this .... is this correct or is there a better way?

Hi Brad,

Another way to achieve is by using a ternary expression in the insert for client_align_rank column. Example

    client_align_score >= 85 ? 'R1' :
    client_align_score >= 70 ? 'R2' :
    client_align_score >= 55 ? 'R3' :
    client_align_score >= 40 ? 'R4' :
    'R5'
1 Like