How to assign a field value to another filed value at run time

Hi Friends,

I am facing a problem while designing ODK form,

My problem scenario is:

i want to assign value of one field to another filed at run time

like
integer a = 10;
integer b = a;

I try to use "${b}=${a}" assignment operator but odk treated "=" as isequals and return Boolean (true/false).

is there any way to use assignment operation.

Any suggestion..

Thanks
Kanhu

Hi Kanhu,

I don't believe that this is possible. Rather, you would want to create a
third field that is a calculate field; using an if() statement in its
calculation expression, you can assign its value to come from different
places depending on some condition. Then, in later note prompts and/or in
your back-end analysis, you can refer to that calculate field rather than
the original field.

Best,

Chris

··· On Mon, Sep 2, 2013 at 9:16 AM, wrote:

Hi Friends,

I am facing a problem while designing ODK form,

My problem scenario is:

i want to assign value of one field to another filed at run time

like
integer a = 10;
integer b = a;

I try to use "${b}=${a}" assignment operator but odk treated "=" as
isequals and return Boolean (true/false).

is there any way to use assignment operation.

Any suggestion..

Thanks
Kanhu

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Chris, for your valuable feedback.

thanks again.
OK i will try and give you confirmation.

··· On Monday, September 2, 2013 6:52:38 PM UTC+5:30, Christopher Robert wrote: > Hi Kanhu, > > > I don't believe that this is possible. Rather, you would want to create a third field that is a calculate field; using an if() statement in its calculation expression, you can assign its value to come from different places depending on some condition. Then, in later note prompts and/or in your back-end analysis, you can refer to that calculate field rather than the original field. > > > > > Best, > > > Chris > > > > > > On Mon, Sep 2, 2013 at 9:16 AM, wrote: > > > Hi Friends, > > > > I am facing a problem while designing ODK form, > > > > My problem scenario is: > > > > i want to assign value of one field to another filed at run time > > > > like > > integer a = 10; > > integer b = a; > > > > I try to use "${b}=${a}" assignment operator but odk treated "=" as isequals and return Boolean (true/false). > > > > is there any way to use assignment operation. > > > > Any suggestion.. > > > > Thanks > > Kanhu > > > > > > > > > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit...@googlegroups.com. > > > > For more options, visit https://groups.google.com/groups/opt_out.

Yes Chris,
I successfully tried,
By using if(selected(${A},'1'), ${B}, ' ')

Thanks!!! its give me alternative solution on my requirement

··· On Monday, September 2, 2013 6:52:38 PM UTC+5:30, Christopher Robert wrote: > Hi Kanhu, > > > I don't believe that this is possible. Rather, you would want to create a third field that is a calculate field; using an if() statement in its calculation expression, you can assign its value to come from different places depending on some condition. Then, in later note prompts and/or in your back-end analysis, you can refer to that calculate field rather than the original field. > > > > > Best, > > > Chris > > > > > > On Mon, Sep 2, 2013 at 9:16 AM, wrote: > > > Hi Friends, > > > > I am facing a problem while designing ODK form, > > > > My problem scenario is: > > > > i want to assign value of one field to another filed at run time > > > > like > > integer a = 10; > > integer b = a; > > > > I try to use "${b}=${a}" assignment operator but odk treated "=" as isequals and return Boolean (true/false). > > > > is there any way to use assignment operation. > > > > Any suggestion.. > > > > Thanks > > Kanhu > > > > > > > > > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit...@googlegroups.com. > > > > For more options, visit https://groups.google.com/groups/opt_out.