on 01-11-2006 8:57 PM
Hi all,
I have configured quick Poll in KM.
My requirement is -
I should be able to get the information , which user voted for which item ?
I can get a count saying that , No of Yes = x, Nos of No = Y.
But I want to know which person voted Yes and which person voted No.
I think this would not be possible using standard Quick Poll functionality.
If I get to know the database table where this info if stored, I might be able to get the required info from there.Is anywhere aware of this database table please let me know.
Or else if you have any other ideas to solve this issue, please let me know.
Thanks,
Vivek
Hi Vivek ,
I quick poll how do we get the count of number of people who hav said yes and who have said no .
In your query you have mentioned that you are able to get the number of people who hav said yes and who have said no .
Could you please provide some info on this.
Regards ,
Navya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Detlev,
I try to use this code rows to get the userName of each vote:
<b>IApplicationProperties appProps = (IApplicationProperties)
ResourceFactory.getInstance().getServiceFactory().getRepositoryService(
resource.getRepositoryManager(), "AppPropertiesRepositoryService");
return appProps.getProperty(
new PropertyName("http://sapportals.com/xmlns/cm:service.quickpoll.QPService", "quickpollvote"),
resource, userId);</b>
I also add the jar: <b>km.appl.ui.quickpoll_api.jar</b> to the Java Build Path: ,
But unfortunately I get Build Time errors, which indicate that some jar is missing.
Thank ahead,
Maya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
is there any JavaDocs for SAP APIs??
Anyway, can someone provide a more detailed example on how to retrieve exact data for KM QuickPoll?
Thanks alot in advance!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vivek,
in general, you should never use DB tables if possible, for the DB schema is definitely subject to change without notice - and that is really done sometimes!
Anyhow, you can access the application property values through the standard KM APIs:
IApplicationProperties appProps = (IApplicationProperties)
ResourceFactory.getInstance().getServiceFactory().getRepositoryService(
resource.getRepositoryManager(), "AppPropertiesRepositoryService");
return appProps.getProperty(
new PropertyName("http://sapportals.com/xmlns/cm:service.quickpoll.QPService", "quickpollvote"),
resource, userId);
... stolen from QPBaseService.class in km.appl.ui.quickpoll_api.jar within com.sap.km.cm.ui\lib.
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Detlev,
Thanks for the instant response.
You mean to say that , we can actually find out which person voted for which Item, by only using the KM API's.
There is absulolutely no need to go at the database level.
If the above statements are true, I'l then dig deep into it and try to solve my requirement using only KM API's.
Thanks again,
Vivek
Hi Vivek,
> There is absulolutely no need
> to go at the database level.
>
> If the above statements are true,
I think I have more or less clearly pointed this out, at least I've tried to That's why I didn't add any answer, for the answer was readable from my first answer (I hoped).
Hope it helps
Detlev
Detlev,
I've tried to use the code you wrote here, but the sentence
IAppProperty map = appProps.getProperty(
new PropertyName("http://sapportals.com/xmlns/cm:service.quickpoll.QPService", "quickpollvote"),
resource, uniqueId);
returns null because the attribute 'properties' of appProps is empty.
I've double checked and the resource exists (qp.xml) and in 'uniqueId' i've sent my user's ID (user.getId()) , and of course i've previously voted in the poll.
I've never used the classes included in the jar you mentioned. Do I have to use any of the classes included there?
Could you please send me the complete code to get an user's vote?
Thanks in advance,
Fede
Hi Fede,
> because the attribute 'properties' of appProps is empty
This sentence does not really make any sense...!?!
> I've never used the classes included in the jar you mentioned. Do I have to use any of the classes included there?
The class I had referred to was just a SAP implementation which accessed the QuickPoll values. So as said, the code given was just stolen from SAP, how they accessed the values. This is now almost three years ago, and it might be that something has changed in the meanwhile (even if I wouldn't really expect this). But it's relatively easy to check: Search for the referenced class, decompile it and check how the code looks today... (and if the class doesn't exist any more, search for a similar class)...
> Could you please send me the complete code to get an user's vote?
I would have to dig deep again, but I don't have that time at the moment. But all starting points for such a research you have got, so try to get familiar with hardcore-portal-coding, which almost always means searching standard implementations, decompiling and understanding how this is resolved within the standard...
Hope it helps nevertheless
Detlev
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.