Confiforms: voting control not working, not counting votes.
Asked by karina ospina:

Hi

I need to get user feedback (confiform registration), show the list of topics registered (confiforms tableview) and allow users to vote for the topics we should discuss in a retrospective (confiform field type voting control). I followed this tut: [Quickly capturing employee votes on things that matter - Vertuna WIKI - ConfiForms](https://wiki.vertuna.com/display/CONFIFORMS/Quickly+capturing+employee+votes+on+things+that+matter))

After clicking vote on an item, the voting count doesn't increase it remains 0 no matter what, the vote button doesn't change.

I tested with my user, another colleague user. So I assume the problem is not logged user. I inserted the field "votes.asCounts" it doesn't count anything.

I don't know what might be happening with something so simple as setting a voting control!?

Source code here:

\<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>choice1\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Choice 1\</ac:parameter\>  
\<ac:parameter ac:name="type"\>text\</ac:parameter\>  
\<ac:parameter ac:name="required"\>true\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="0221e7b7-2d3e-4791-9e44-1ed5a8bf314e" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Vote!\</ac:parameter\>  
\<ac:parameter ac:name="values"\>Vote for me!\</ac:parameter\>  
\<ac:parameter ac:name="extras"\>Remove my vote\</ac:parameter\>  
\<ac:parameter ac:name="type"\>voting\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="34586145-846a-47a7-b52a-b0a13ad6eb78" ac:name="confiform-field" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes.asCounts\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1"\>  
\<ac:parameter ac:name="atlassian-macro-output-type"\>INLINE\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<br/\>  
\<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>


Answers:
author: Alex Medved _ConfiForms_
body: Hi

There is no such function as "asCounts", but there is a function called "asCount" that you can use

So, the expression should be **votes.asCount**

And the ConfiForms Field needs to be used from within view macro, ie in TableView in current case

Please note that voting control works only for authenticated users

Alex

comments: author: karina ospina
body: Hey Alex!

Thanks for your kind help. I corrected the typo, it doesn't work ...

\>When I click on vote button it doesn't count the vote. I am logged in.

![vote error.png](https://community.atlassian.com/t5/image/serverpage/image-id/197915i348E42D7A064D782/image-size/large?v=v2&px=999 "vote error.png")

Here the source code:

\<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>choice1\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Choice 1\</ac:parameter\>  
\<ac:parameter ac:name="type"\>text\</ac:parameter\>  
\<ac:parameter ac:name="required"\>true\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Vote!\</ac:parameter\>  
\<ac:parameter ac:name="values"\>Vote for me!\</ac:parameter\>  
\<ac:parameter ac:name="extras"\>Remove my vote\</ac:parameter\>  
\<ac:parameter ac:name="type"\>voting\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="a1788284-ffe8-42ef-a3b4-0ba9056e0b6a" ac:name="confiform-field" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes.asCount\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1"\>  
\<ac:parameter ac:name="atlassian-macro-output-type"\>INLINE\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>


author: karina ospina
body: Hi Alex!

Thanks for your kind help. After correcting the typo "as.Counts" it is still not working. The vote button doesn't change the counter. (I am logged in)

![vote error.png](https://community.atlassian.com/t5/image/serverpage/image-id/197916iCA30B97850B64499/image-size/large?v=v2&px=999 "vote error.png")

![logged user.png](https://community.atlassian.com/t5/image/serverpage/image-id/197917i9E67F38A44396672/image-size/large?v=v2&px=999 "logged user.png")

**Here the source code:**

\<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>choice1\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Choice 1\</ac:parameter\>  
\<ac:parameter ac:name="type"\>text\</ac:parameter\>  
\<ac:parameter ac:name="required"\>true\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Vote!\</ac:parameter\>  
\<ac:parameter ac:name="values"\>Vote for me!\</ac:parameter\>  
\<ac:parameter ac:name="extras"\>Remove my vote\</ac:parameter\>  
\<ac:parameter ac:name="type"\>voting\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="a1788284-ffe8-42ef-a3b4-0ba9056e0b6a" ac:name="confiform-field" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes.asCount\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1"\>  
\<ac:parameter ac:name="atlassian-macro-output-type"\>INLINE\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>


author: karina ospina
body: AND

when I put the field "votes.asCount" inside tableview, the vote button is gone.

![ascount in view.png](https://community.atlassian.com/t5/image/serverpage/image-id/197924i24C52CE5296A9374/image-size/large?v=v2&px=999 "ascount in view.png")

**Here source code for that:**

\<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>choice1\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Choice 1\</ac:parameter\>  
\<ac:parameter ac:name="type"\>text\</ac:parameter\>  
\<ac:parameter ac:name="required"\>true\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Vote!\</ac:parameter\>  
\<ac:parameter ac:name="values"\>Vote for me!\</ac:parameter\>  
\<ac:parameter ac:name="extras"\>Remove my vote\</ac:parameter\>  
\<ac:parameter ac:name="type"\>voting\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<br/\>  
\</p\>  
\<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1"\>  
\<ac:parameter ac:name="atlassian-macro-output-type"\>INLINE\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="a1788284-ffe8-42ef-a3b4-0ba9056e0b6a" ac:name="confiform-field" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes.asCount\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>


author: karina ospina
body: Hey Alex!

Thanks again for your support!. After you sharing the screencast with my code on your confluence environment and me trying the same on my company confluence setup, I conclude it can onle be some sysadmin setup that prevents me to use the confiform voting control.

I corrected what you suggested, and use exactly the same macros in the order you suggested in the video, AND it doesn't work...

![test vote me.png](https://community.atlassian.com/t5/image/serverpage/image-id/197958iB19771A321DE76AB/image-size/large?v=v2&px=999 "test vote me.png")![edit confiform voting control.png](https://community.atlassian.com/t5/image/serverpage/image-id/197959i23DBD4DFA9C3CEDE/image-size/large?v=v2&px=999 "edit confiform voting control.png")

**Here source code:**

\<ac:structured-macro ac:macro-id="31980d4b-28f9-421f-a99a-230dd0c159d2" ac:name="confiform" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="0b30486c-0e45-4bc5-89a8-96c5238aa8a4" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>choice1\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Choice 1\</ac:parameter\>  
\<ac:parameter ac:name="type"\>text\</ac:parameter\>  
\<ac:parameter ac:name="required"\>true\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="5f53e847-762f-4919-b9bb-051799125597" ac:name="confiform-field-definition" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes\</ac:parameter\>  
\<ac:parameter ac:name="fieldLabel"\>Vote!\</ac:parameter\>  
\<ac:parameter ac:name="values"\>Vote for me!\</ac:parameter\>  
\<ac:parameter ac:name="extras"\>Remove my vote\</ac:parameter\>  
\<ac:parameter ac:name="type"\>voting\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<br/\>  
\</p\>  
\<ac:structured-macro ac:macro-id="31c1c027-878e-4357-9ca6-4c099db47435" ac:name="confiform-entry-register" ac:schema-version="1"\>  
\<ac:parameter ac:name="atlassian-macro-output-type"\>INLINE\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<p class="auto-cursor-target"\>  
\<br/\>  
\</p\>  
\<ac:structured-macro ac:macro-id="35c85711-cee2-47eb-ac05-4ebf6c8c30af" ac:name="confiform-table" ac:schema-version="1"\>  
\<ac:parameter ac:name="formName"\>voting\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>  
\<ac:structured-macro ac:macro-id="63c80c14-44e0-4ac0-98b3-4414b156b79f" ac:name="confiform-field" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>choice1\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\<p\>  
\<ac:structured-macro ac:macro-id="262ae748-8dd2-457f-869e-c42b25116226" ac:name="confiform-field" ac:schema-version="1"\>  
\<ac:parameter ac:name="fieldName"\>votes\</ac:parameter\>  
\</ac:structured-macro\>  
\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>


Tags: confiforms

confluence-server

server