Skip to main content
June 21, 2023
Solved

REST API backed custom picker field in an editable user grid

  • June 21, 2023
  • 9 replies
  • 2 views

Scenario: User wants to bulk edit rows of data which have been stored in MariaDB. User is presented with data (ranging upto 150 rows) in an editable grid. The first column in the editable grid is a picker field whose suggestFunction calls an external REST API. When the user loads the page (clicks "edit" record), will the REST API be invoked per row of the editable grid?

    Best answer by stefanhelzle0001

    It depends a bit on how you return the data from the suggest function. The field "identifiers" is an ANY type. Means, that you can store a list of maps in there that can then include the actual identifier plus the display value. Check out my blog post where I describe how to allow adding new items from a custom picker.

    appian.rocks/.../

    9 replies

    June 21, 2023

    Yes, it will be invoked for each custom picker field. Why don't you save the response in a local variable outside and pass it to suggestion function?

    stefanhelzle0001
    Brainy
    June 21, 2023

    How much data does this API return? The API will only be called as the user interacts with that picker field.

    June 21, 2023

    Each call returns a very small amount of data. About 7 key:value pairs. 6/7 have a max length of 10 char, one can be about 40 chars. 

    But, when the page loads, wont the custom picker field have to invoke the suggestFunction for all the picker fields? I was thinking that the call to the suggestFunction is how the picker is validating the data

    June 22, 2023

    Suggestion function will be invoked for each custom picker field when the user will interact.