Hi Experts,
I need help for following three scenarios around numeric items B12, B18 and B19. Can you please help in providing logic text or some leads in this regard.
1. For B19 the value should auto fill/appear that would be actually answer of B12 divided by B18. Value in B19 decimals is also a possibility.
• answer in B12 =100, to be entered by enumerator
• answer in B18 = 7, to be entered by enumerator
• answer in B19 = 100/7=14.29, auto filled/appeared and may not be edited
2. For B19 the value should auto fill/appear that would be actually answer of B12 plus B18.
• answer in B12 =100, to be entered by enumerator
• answer in B18 = 7, to be entered by enumerator
• answer in B19 = 100+7=107, auto filled/appeared and may not be edited
3. For B19 the value should auto fill/appear that would be actually answer of B12 minus B18.
• answer in B12 =100, to be entered by enumerator
• answer in B18 = 7, to be entered by enumerator
• answer in B19 = 100-7 =107, auto filled/appeared and may not be edited
regards
Auto mathematical calculations using numeric items
-
- Posts: 49
- Joined: October 15th, 2020, 3:40 am
Re: Auto mathematical calculations using numeric items
Do following like this:
B19
Preproc
$ = B12/B18;
setproperty($,"Protected","Yes");
You can calculate the other values using the "-" and "+" operators like this.
Remember, the B19 variable should be 2 decimal place or as your need.
Thanks.
B19
Preproc
$ = B12/B18;
setproperty($,"Protected","Yes");
You can calculate the other values using the "-" and "+" operators like this.
Remember, the B19 variable should be 2 decimal place or as your need.
Thanks.
Re: Auto mathematical calculations using numeric items
Dear Arjun,
Thank you very much it is working .
However, now B19 item does not appear on devise because we protected it. I want B19 should appear on devise with auto calculated value with no option for enumeration to change/edit the value in B19. Appreciated, if you help in this regard too.
Thank you very much it is working .
However, now B19 item does not appear on devise because we protected it. I want B19 should appear on devise with auto calculated value with no option for enumeration to change/edit the value in B19. Appreciated, if you help in this regard too.
-
- Posts: 49
- Joined: October 15th, 2020, 3:40 am
Re: Auto mathematical calculations using numeric items
I think you can create the "Blocks" using B19 and other variables (two or more variables), which appear in a single screen on android. For more about Blocks:
https://www.csprousers.org/help/CSPro/blocks.html
If other user have other ideas they will share.
Thanks.
https://www.csprousers.org/help/CSPro/blocks.html
If other user have other ideas they will share.
Thanks.
Re: Auto mathematical calculations using numeric items
Its working through using blocks. Thanks its helpful .
Re: Auto mathematical calculations using numeric items
In addition to blocks you can also just save the value to a local variable on entry, then write it back to the cell on exit.
But since B19 is being calculated, you also have the option of just repeating the calculation on exit.
Sherrell
But since B19 is being calculated, you also have the option of just repeating the calculation on exit.
Sherrell