How to verify content of text question with external app

Hello everyone,

I have a text question that asks for the grid coordinates of a fishing ground. Obviously the grid location must be located on seawater and not on land.

As a backgrounder, a windows application already exists for fisheries monitoring and it asks for location of fishing ground using grid coordinates. The grid coordinate has a naming convention we call BINGO coordinates because we use numeric row names and alphabetic column names.

In ODK collect, I would like to have a text question asking for location of fishing ground using the same convention used in the windows app.

So these are the steps that will happen.

  1. user inputs BINGO coordinates of fishing ground using a text question
  2. ODK collect launches an external app passing the BINGO coordinates to it.
  3. external app displays a message if fishing ground is really on water or if it is on land
  4. external app calculates the geographic location (longitude, latitude) of the BINGO coordinates
  5. ODK collect receives the lon-lat pair from external app
  6. In ODK collect, user may opt to display lon-lat pair on a map

I think its similar to how a geopoint inputted in ODK collect can be displayed on an external app (google maps for example)

Can someone point out to me how to get started, if this is possible? (i know this is possible)

Thanks

There is some information in the docs about both launching apps from Collect and launching Collect from external apps.

Just FYI, a possible alternative - assuming your BINGO coordinate conversion calculation is relatively straight-forward - would be to perform this within the form using a suitable calculation. Or - if the BINGO permutation table is sufficiently small - directly lookup the conversion from an associated csv (presumably this approach would be needed to identify if the location is on water or land...).

@danbjoseph and @Xiphware,
What I did is along the lines of what @Xiphware suggested. I just used a lookup csv. The csv contains all the BINGO coordinates that are located inland. In xlsform, I have 3 questions (one text and 2 integer) that is concantenated to give the complete BINGO coordinate. Then I use a pull-data query on the csv using the concatenated value as the search parameter. If the pull-data query returns something, then I know that the inputted coordinate is inland. I then make a warning note visible to the user.

What I find amazing is that the lookup csv contains more than 40,000 inland gird coordinates (the grid coordinates are 2x2 km in dimension so there are a lot of them) but there is no delay in detecting if the location is inland.

Thanks for your help.