Solved

Suggestions to consult API during filling out a form.

  • 3 November 2022
  • 5 replies
  • 104 views

Userlevel 5
Badge +16
  • Thinkwise Local Partner Brasil
  • 384 replies

Any community suggestions how to consult an API (via flow I guess) when adding/editing a record. If a user exits a column in a form (and it is filled) I want to check its value through an API. 

icon

Best answer by J. de Lange 30 November 2022, 10:56

View original

This topic has been closed for comments

5 replies

Userlevel 3
Badge +4

We have been considering the same functionality as well. The easiest way to implement something like this would be to start a process flow after committing the form of a task, use a http connector to make the API call and then either commit the data to tables or, in case of invalid data, show a message and activate the task again to let a user fix their values.

This isn’t quite what you seem to ask for though. If you want immediate validation of data while the user is still in the form (without saving the data first) or want to auto complete for example an address while the user is filling a form, it gets a lot more complicated.

One way of theoretically doing this would be to add a default procedure to a form which inserts data that needs to be checked to a table as soon as a user leaves the field. A scheduled system flow should check this table regularly (scheduled every few seconds) and make an API call to validate the data whenever there is a new row with data that hasn’t been checked. The default procedure should check this table whenever it gets activated and there is a value that still needs to be validated and trigger a message when the data is incorrect.

 

There are some problems with this solution however… 

Default procedures only get activated when a user enters or leaves a field which may make it feel not responsive at all. It also doesn’t prevent a user from  committing data before it’s checked. You may still need to activate a process flow to check the data in case a user does this.
This would also require careful management of the table used by the system flow since it could grow quite fast. 

Any other ideas for this would be very welcome since the above solution is far from ideal.

Userlevel 7
Badge +23

Hi Freddy, Would the Input constraints feature, that will be part of 2023.1, be of any help or do you need to call a custom API?

Userlevel 5
Badge +16

Hi Freddy, Would the Input constraints feature, that will be part of 2023.1, be of any help or do you need to call a custom API?

if a input constraint can be coupled to a flow, it would suffice..  because in this case I would like to validate the input on a governmental API for company ID's. 

Userlevel 7
Badge +23

That is not possible yet, but feel free to create an Idea. Starting short process flows or something similar after updating a column in a form or pop-up would be a nice concept to have I think.

Userlevel 3
Badge +4

That is not possible yet, but feel free to create an Idea. Starting short process flows or something similar after updating a column in a form or pop-up would be a nice concept to have I think.

I believe this idea already exists and would solve this problem: