Return one value for multiple conditions

In the image bellow the 3fields in the square come from a dropdown  ("SI" or "NO") in a user interface.

I can see the user responses in a read-only grid (see the image bellow). 

I want IF 3 condition ("Financial", "Documents", "Certificate") in the red square are "SI" then the column "Estado" return a new value "Finalizado"

 IF just one condition ("Financial", "Documents", "Certificate") in the red square are "NO" then the column "Estado" return a new value "Pendiente"

Next i want to store the value of the column "Estado" in my cloud database

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    To store the data into DB, you have to create a link or button for the action to writeDataintoDatastore but to show the value into Estado column. you can use the below code under value configuration of the grid column of Estado.

    if(
    and(
    fv!row.financial="SI",
    fv!row.documents="SI",
    fv!row.certificate="SI",
    ),
    "Finalizado",
    "Pendite"
    
    
    )

  • Hi Deepak

    Thanks so much,

    Im trying but now i want to do this:

    IF 3 condition ("Financial", "Documents", "Certificate") in the red square are "SI" then the Text Filed  "Estado de proceso vendedor" return a new value "Finalizado"

     IF just one condition ("Financial", "Documents", "Certificate") in the red square are "NO" then the Text Filed  "Estado de proceso vendedor" return a new value "Pendiente"

    This part is new

     IF 3 or 1 condition ("Financial", "Documents", "Certificate") in the red square are "EMPTY" then Text Filed  "Estado de proceso vendedor" return a new value "En Proceso"

    In the blue square (image bellow) is the value generate by the conditions above, i want that value store in my CloudDatabase after clicking SUBMIT button.

    This is the expresión of the Text Filed  "Estado de proceso vendedor" 

    a!textField(
    label: "Estado de proceso VENDEDOR",
    labelPosition: "ADJACENT",
    value:
    if(and(
    ri!CWA_OECVendor.oecvendorverffinancial ="SI",
    ri!CWA_OECVendor.oecvendorverfdocs ="SI",
    ri!CWA_OECVendor.oecvendorregistroac ="SI"
    ),
    "Finalizado","Pendiente"
    ),
    saveInto:
    a!save(ri!CWA_OECVendor.oecvendorstatus,
    if(and(
    ri!CWA_OECVendor.oecvendorverffinancial ="SI",
    ri!CWA_OECVendor.oecvendorverfdocs ="SI",
    ri!CWA_OECVendor.oecvendorregistroac ="SI"
    ),
    "Finalizado","Pendiente"
    )
    ),
    refreshAfter: "KEYPRESS",
    characterLimit: 55,
    required: false,
    readOnly: false,
    align: "LEFT"
    )

  • 0
    Certified Senior Developer
    in reply to danna3499

    With the click of a button, you can save the variable value by using the same expression which you are using for visibility. And use that variable while insertion.

  • Thanks it works.

    and for this part please 

    IF 3 condition ("Financial", "Documents", "Certificate") in the red square are "SI" then the Text Filed  "Estado de proceso vendedor" return a new value "Finalizado"

     IF just one condition ("Financial", "Documents", "Certificate") in the red square are "NO" then the Text Filed  "Estado de proceso vendedor" return a new value "Pendiente"

    This part is new

     IF 3 or 1 condition ("Financial", "Documents", "Certificate") in the red square are "EMPTY" then Text Filed  "Estado de proceso vendedor" return a new value "En Proceso"

Reply
  • Thanks it works.

    and for this part please 

    IF 3 condition ("Financial", "Documents", "Certificate") in the red square are "SI" then the Text Filed  "Estado de proceso vendedor" return a new value "Finalizado"

     IF just one condition ("Financial", "Documents", "Certificate") in the red square are "NO" then the Text Filed  "Estado de proceso vendedor" return a new value "Pendiente"

    This part is new

     IF 3 or 1 condition ("Financial", "Documents", "Certificate") in the red square are "EMPTY" then Text Filed  "Estado de proceso vendedor" return a new value "En Proceso"

Children