Ex:intent with variables not working

We are developing an application to return photos and text strings back to Collect to populate multiple fields, following the documentation https://docs.getodk.org/launch-apps-from-collect/. For this external application to work properly, we need to pass some data to it from collect, which is from a user input. But when I set the intent call to:

ex:com.my.externalapp(value='command',customtext=${text1})

Collect returns an error "Could not evaluate '${text1}'"

If I put a constant there, it works properly. For example: ex:com.my.externalapp(value='command',customtext='My constant text') works very well. So I think I'm making some mistake with the syntax, what would be the right way to do this?

1 Like

Unfortunately, not so many people have experience working with external apps. Please let us know if you figure this out!

I wish this would work as with others. Has anybody found out a solution to this? @amalm

If it could help I found out that doing this (i.e. putting quotes around the variable)

ex:com.my.externalapp(value='command',customtext='${text1}')

will push a random value like 'aw98w211we/text1'. Does this mean anything?

If you refer to another question it should not contain quotes so definitely the expression should be like:
ex:com.my.externalapp(value='command',customtext=${text1})

@amalm
could you attach your form? because I guess there is something wrong there.