Question regarding forms and field validation

Certified Senior Developer

need a quick solution on one of the problem statement in Quantum
Form -> fields validation to be done from the pre-configured table validation queries
example:-
- lets assume a form has 5 fields
- 5 fields has 5 different validations
- validations are stored in the database in the form of 5 distinct queries
1. Form Name
2. Field Name
3. Validation ( queries, which is stored in validation table against each field in the below form:
ex : to validate age field the query in the db : select age from table1 where formName = "form1"
and age > 40)
(there will be 5 different, queries like this for each form elements)


Question:-

Is there a ready made solution in Apian for ...

OriginalPostID-191735

OriginalPostID-191735

  Discussion posts and replies are publicly visible

Parents
  • @ajoyr To answer your question straight to the point, I don't think there is a ready made solution available.

    If I understand correctly, the 'Validation' field in database table contains a value in form of Text, which could be a typical native SQL statement. If so, this kind of facility isn't available OOTB in the product. But I think you may need to write expression rules in Appian to parse these native SQL statements or write a function which executes SQL statements and obtain the results accordingly. From my perspective, this kind of approach may not be great, because ultimately the performance of the SAIL interface goes down upon the increase in the validations and their associated complexities. Still I would leave this to other practitioners as I haven't dealt with this so far.

    As suggested above, you could use queryEntity() but I think it requires a revision of database structure as well. For instance, if we need to validate against the age when it's below 40, then we need to store the same fact in the database as well.
Reply
  • @ajoyr To answer your question straight to the point, I don't think there is a ready made solution available.

    If I understand correctly, the 'Validation' field in database table contains a value in form of Text, which could be a typical native SQL statement. If so, this kind of facility isn't available OOTB in the product. But I think you may need to write expression rules in Appian to parse these native SQL statements or write a function which executes SQL statements and obtain the results accordingly. From my perspective, this kind of approach may not be great, because ultimately the performance of the SAIL interface goes down upon the increase in the validations and their associated complexities. Still I would leave this to other practitioners as I haven't dealt with this so far.

    As suggested above, you could use queryEntity() but I think it requires a revision of database structure as well. For instance, if we need to validate against the age when it's below 40, then we need to store the same fact in the database as well.
Children
No Data