Default Expression Not Working!!

  • Asked
  • Active
  • Viewed 5258 times
0

Hello Support Team and Expert Users,

I am trying to get an attribute value automatically from one of the column in sampling point data. I wrote an Xpath expression (idm:samplingPointData('slope', /col, /row, /number)) to make the extracted attribute value as default value for the given attribute. But it didn't work. However if I use the same expression and calculate the value (i.e. tick the calculated button), it works. But I do not want to calculate the value, I just want to put that value as default as I might need to change the attribute value at some point. Anyone have any idea what is going wrong?

Thanks

Milan

0

Accepted answer

Dear Milan,
That expression doesn't work as a default value expression because the default values are applied when you create a new record or you add a new entity, instead the calculated attributes are (re)calculated every time an attribute it depends on changes.
Can we have more details about the structure of your survey? Maybe the default value is not applied correctly because, when the relative attribute it's created, the values of col row and number are not yet available.
Thanks,
Open Foris Team

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.