Variable for csv filename in pull-data

Thank you @josh. You are correct that this does not work in Enketo and I have now been able to see that in the xml of the XLSForm. @wroos - it doesn’t matter what format used for the first arg of pulldata, it is used without translation.

I have worked around this for now using ‘if’ statements to pull from different files as suggested here:

This is really a workaround and not a solution as what I was looking for was a way to have my filename be set by default to a variable so I could easily change filenames. With this workaround, I still have the filename hardcoded in multiple/many places in my form.

I thought I saw elsewhere in the specs that variables could be used for all the args to pulldata…
Even if preloading, it seems that could be possible with a variable that is given a default value in the form (ie one that is not dependent upon user input).

BTW, I am not seeing /transform/xform in Chrome dev tools. Is this on form load?

1 Like