Referencing a previous answer in next question

31 views
Skip to first unread message

Zak Kaufman

unread,
Nov 11, 2011, 9:31:14 AM11/11/11
to xls2xform
Hi,
I really love the new xls2xform - it's made life a lot easier! One
issue I ran into, however, is that you can no longer reference a
previous answer in the caption or hint of new answer with the code
<output ref="../fieldname">. When you put that into Excel, the
following code is generated in the XML:

&lt;output ref=&quot;../fieldname&quot; /&gt;

How do you reference a previous field in the new version of xls2xform?
Do I have to go in and edit the code for all these questions?

Thanks and all the best from South Africa,
Zak

Prabhas Pokharel

unread,
Nov 11, 2011, 11:00:31 AM11/11/11
to xls2...@googlegroups.com
I believe you can reference by using ${fieldname}
--
Prabhas Pokharel
http://twitter.com/prabhasp
Nepal mobile: +977 98137 91044
US mobile: +1 347 948 7654
skype/facebook/whatever: prabhasp

Matt Berg

unread,
Nov 11, 2011, 11:03:31 AM11/11/11
to xls2...@googlegroups.com
Or you could just put in

../fieldname

You might want to checkout a tool we've been working on called formhub.org that helps you author and deploy xlsforms.

Here is some more docs on the syntax too that might be helpful


Thanks,

Matt

Prabhas Pokharel

unread,
Nov 11, 2011, 11:08:36 AM11/11/11
to xls2...@googlegroups.com
I believe ${fieldname} is the syntax for that. Something that worked for me on formhub:

type name label
text village Which village are you in?
select one from phcs or specify other phc Which PHC are you visiting in ${village}?

On Fri, Nov 11, 2011 at 9:31 AM, Zak Kaufman <zachary....@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages