Mot235
03-13-2022, 12:58 PM
Hi is there a way for me to be about to count the number of search results returned from a searchJSON to pass into a variable that I can display to users.
I'm trying to do this as a way to display post counts each user has in a specific topic and this is where I am stuck.
Any help would be amazing.
<a href="{vb:url 'search'}?searchJSON=%7B%22author%22:%22{vb:raw conversation.authorname}%22,%22exactname%22:%221%2 2,%22channel%22:[{vb:raw conversation.nodeid}]%7D">[ISO {vb:raw conversation.authorname}]</a>
<vb:else />
<a href="{vb:url 'search'}?searchJSON=%7B%22author%22:%22{vb:raw conversation.authorname}%22,%22exactname%22:%221%2 2,%22channel%22:[{vb:raw conversation.parentid}]%7D">[ISO {vb:raw conversation.authorname}]</a>
</vb:if>
So far I have been able to generate the search to pull every post a user has in a specific topic in this snippet.
I'm trying to do this as a way to display post counts each user has in a specific topic and this is where I am stuck.
Any help would be amazing.
<a href="{vb:url 'search'}?searchJSON=%7B%22author%22:%22{vb:raw conversation.authorname}%22,%22exactname%22:%221%2 2,%22channel%22:[{vb:raw conversation.nodeid}]%7D">[ISO {vb:raw conversation.authorname}]</a>
<vb:else />
<a href="{vb:url 'search'}?searchJSON=%7B%22author%22:%22{vb:raw conversation.authorname}%22,%22exactname%22:%221%2 2,%22channel%22:[{vb:raw conversation.parentid}]%7D">[ISO {vb:raw conversation.authorname}]</a>
</vb:if>
So far I have been able to generate the search to pull every post a user has in a specific topic in this snippet.