Error on device

Hello, I am working for a long time already on a form, after some adaptations, redeploying and uploading on my smartphone appears now the error notification on my smart phone:
XPath evaluation: type mismatch Expected XPath path, got Xpath expression: [randomize(instance(‘uf5el41’)/root/item)],null

Can somebody help me?

Hi
This seems to be an issue with one of the calculate functions in your form. To be precise, I assume this has to do with the randomize functionality. I suggest you check the way you have done that calculate function and resolve it.

Regards
Stephane

1 Like

This was the reason, many thanks!

2 Likes

hi, i have the same problem but using the building functionality on kobotoolbox. I have no calculation.

Hi @gap1981,

Welcome to the community! In this case i would advise you to download your xlsform survey form from the form builder user interface and then make corrections from the xlsfrom (please check for randomize in the xlsform).

Hello,

I’m experiencing a similar problem. I’ve created a form online, deployed, checked the form but still I have this message: Xpath evaluation: type mismatch Expected XPath path, got XPath expression: [randomize(instance(vd1dg20’)/root/item, 20)],null

I can download the blank form, but not open it to fill in.

Thanks for your help
pan-uk-1

Hi
Welcome to the forum. Looking at your issue, this points to a calculate function on your form. Can you send the sample of form you can download

Regards
Stephane

1 Like

Hello, I am also trying to get the randomize function to work. It seems this can’t be resolved from the Kobo dashboard. What should I do to fix it in XLS?

The forum won’t let me upload a photo as a new user ( :frowning: ) .

select_multiple zg21q97 randomized_question randomized question true randomize=true;seed=1
calculate version ‘vLFEt3TkNvRqjgeQxAab4u’

Hi @jbowker3,

Welcome back to the community! To solve your randomize issue, download the xlsform and then scan the parameters column, there you will somewhere see the randomize. Simply delete it if you do not wish to make the choice a random one.

Hi @Kal_Lam thanks for replying!

My problem is that I do want to randomize but it is giving me an xpath error when I open it up as it is currently. Is there something I need to change in the xls (sorry this is my first time fidgeting with the xls side of things)

So I updated the ‘calculate’ column to: once(decimal-date-time(now()))

but i’m still getting the errot with xpath expression: [randomize(isntance(zzg21q92’)/root/item, 1)},null

Any ideas what’s not parsing here?

Hi @jbowker3,

You could simple do as shown in the image below:

In your survey tab:
Image%201
In your choices tab:
Image%202

You should now be able to randomize your choices!

as you can see my question is set up in a very similar fashion, but something is not work. as @stephanealoo said above it could be a calculate issue, but I can’t figure out what it is. @susanzschocke84 can you share what you did? I’ve been trying to fix this all day!

Thanks :slight_smile: