Solved

API data show in popup grid

  • 24 August 2022
  • 4 replies
  • 52 views

Userlevel 2
Badge +5

hi,

For a calculation module we use a 3rd party API, which gets us a json with +/- 10 records, the user has to pick 1 of these options. Each record has a unique code, this is the only field we actually have to store in our model.

So I thought of a processflow, starting from a task, get the json, show the data in a pop-up grid to the user, choose 1 record, save the code in our model, and we’re ready. Is this the proper way to do this? 

  1. Do we have to save all data from the json to the database to show it in a grid? We only need the selected code, the other data is on-the-fly but needed for the user to make the decision, is there a more temporarily way?
  2. How to popup the grid on top, so the user has to select a record to close the popup?

 

icon

Best answer by Erwin Ekkel 25 August 2022, 08:54

View original

This topic has been closed for comments

4 replies

Userlevel 6
Badge +16

How I would solve this: 

Store the JSON as a string in a table. 
In the process flow navigate to a view.
The view shows the JSON data mapped as a table.
On the view add a task to select and store the value of the chosen row. 
Set a tickbox: completed on the table with the json data. 
Continue with the process flow. 

(optional add a task to clean up the json data in the table after x days/months.)

Userlevel 2
Badge +5

Thanks Erwin, never thought of a view getting the json data. Now I got the view showing (set the extended properties for floating document width), selecting the record and save the code.

Still wondering how to continue with the initial process flow. By opening the document the flow is stopped right? Or can it be continued after executing the task in the view? e.g. after saving the code there are some extra things I’d like to execute.

Userlevel 6
Badge +16

Perhaps instead of showing the view. Start a second task that has a lookup to this view. This way you won't have to navigate to the view and can stay within the context of the process flow. 

Userlevel 2
Badge +5

Ah, thanks Edwin. The lookup option is indeed a beter way for handling the popup, and all steps are now in 1 processflow. Got it working now!