How can you ensure that images are marked as mandatory in vDesigner 2?

How can you ensure that users cannot proceed on next screen until they upload or capture an image in VDesigner 2 ?

We can configure a BR with the logic:

The images’ data will be stored in a list.

So you can utilize the length function for the list to check that the length of the list should be greater than 0. and map it on the navigate task.

1 Like

@AnushkaGupta This looks great! It would be even better if you could explain the process by providing some examples to make it more clear and relatable.

Sure, @Ritik_Dixit

You can follow the guidelines below to achieve this functionality:

You must be storing your images on some entity path and to extract the count of documents, it is recommended that you use List as the data type for the entity’s attribute. Example:

"Testing":
[  
     "Images": [ ],
      "Count": " "
]

As per your requirement, if the user clicks on the “Navigate” button, the user should not navigate and text should be made visible that the image is mandatory.

To achieve this configure a BR, with statement:

IF LENGTH(Images.list_entity_path) > 0 THEN
    Navigate = "true"
END IF

Map this Bussiness Rule on the navigate task.

And, to made the task visible, configure this BR.

IF LENGTH(Images.list_entity_path) = 0 THEN
    Visible = "true"
END IF

And, now you’ll have to invisible the “This Image is mandatory” text also when the user clicks any image.

Fot that you will map an invisible task on the Open Camera’s OnClick event with BR:

IF LENGTH(Images.list_entity_path) > 0 THEN
    Invisible = "true"
END IF
1 Like