input for variable

Options
eldoland
eldoland Member
edited May 2023 in ? Working with APIs

Hi, im trying to create an input for the bounding box from this external api


curl --get '' \
--data "tags=amenity%3Drestaurant" \
--data "api_key=XXXXXXXXXXX" \
--data "bbox=-87.6489,41.8503,-87.6008,41.9053"


so i added %s instead of -87.6489,41.8503,-87.6008,41.9053
btw i can't find the correct input to get these 4 numbers correctly, i tried text, enum, polygons, json but i always get an error message
what is the correct input?
thanks

Best Answer

  • eldoland
    eldoland Member
    Answer ✓
    Options

    this did the trick
    Field Name: BoundingBox
    Data Type: Text

    In the field settings, you can set the input validation pattern to ensure that the user enters the values in the correct format. For example, you can use a regular expression pattern like this: "^-?\d+(.\d+)?,-?\d+(.\d+)?,-?\d+(.\d+)?,-?\d+(.\d+)?$". This pattern checks for the correct format of four decimal numbers separated by commas.