Skip to Content
0

How to -C4C Survey- Reset using program

May 17, 2017 at 12:10 AM

141

avatar image
Former Member

Dear Experts,

I have following situation :

Every first visit of a month should have a blank Survey. All the subsequent visits of the month should have survey answers copied from previous visit.

Then First visit of next month, again the survey should be blank and the same process continues.

In C4C Survey Configuration, we can use the "Previous Answers" checkbox. If ticked, then answers are always copied - Which is fine but I need to add a business logic somewhere such that when first visit of month, then reset the answer.

Any idea how can this be achieved ?

Many Thanks,

Suchita

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Gabriel Brage
May 17, 2017 at 01:54 PM
1

Hello Suchita

From my experience there is no way to perform this in a standard way, in that case you will have do design this by using a Custom code solution (PDI), you can do this by finding a partner to develop this feature or in case of urgency you may contact the SAP Cloud Service - servicecenter@sap.com

Best Regards

Gabriel Brage

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Gabriel,

Thank you for your reply.

Sorry, but I did not understand what you mean by "Custom code solution (PDI)" and "finding a partner to develop this feature or in case of urgency you may contact the SAP"

Can you please elaborate on this ? I already understand that we will need a PDI development to solve this and we have developer tenant and I have developer access too. The reason I post this question on forum because in Cloud application Studio, I don't see access to the component/screen of survey runtime ( which as I understand is generated at runtime using XML) nor I have access to reset action that is invoked on click of Reset button on a survey.

Can you please explain a bit more on what exactly we will need to solve this ? Its a critical requirement for our project.

Awaiting a reply,

Many Thanks in advance.

Regards

Suchita

0

Hello Suchita,

I did not know that you were part of the customer development team. Did you try already the answer provided by Horst? If this do not work, then as far as I could understand you are not being able to do this due to a PSM release details (cases where the SAP development team need to allow you to edit some specific part of the system via SDK). If this is the case then an incident to SAP will be required and we will check if we can release this field to be editable.

Best Regards

Gabriel Brage

0
Former Member
Gabriel Brage

Thanks Gabriel.

0
Horst Schaude
May 18, 2017 at 11:38 AM
1

Hello Suchita,

You need to locate the BO representing a visit. In C4C this should be the Activity from the namespace AP.PC.ActivityManagement.Global.

In this BO you need to determine if the current instance is the first visit in this month (maybe a flag, maybe a query, ...)

In that case you would reset the associated survey.

HTH,
. Horst

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Horst,

Thanks for the reply and great inputs.

My problem is, the Survey needs to copy answers from previous visit & this feature is out of the box by ticking the "Previous Answers" checkbox on Survey template.

However, when the acutal survey is executed, I am unable to

1) figure-out where do I hook up my business-logic to reset the answers

2) How to reset the answers as there is no Reset action available to me in Questionnair BO, ValuationCollection node etc.

Any thoughts ???

Best Regards

Suchita

0
Former Member

On Further investigations

COD_VISIT_TI ->SurveyTab

Name->Link->Propeties OnClick -> tracing this and all related actions, my guess of runtime survey's custom tab on responsive UI and Survey runtime generation via XML was correct.

Since nothing of this is exposed to PDI users (developers), we really have no idead what SAP does behind the scenes & I therefore see that there is no way I can reset the survey programmatically which is really bad and inflexible C4C PDI !!!

Does this mean we can not meet this business requirement by any means ?

Can you or anyone from SAP please confirm this ??

Thanks & Regards

Suchita

0

Hello Suchita,

If you need elements, nodes, actions,... to be usable in PDI they must be PSM-released.
This is a task done by the owner of the resp. entity, not PDI.

The way to request this PSM release is to create an incident, which describes what and why you need.

HTH,
. Horst

1

Thanks Horst :-)

Most of the nodes are PSM released but there is no action for RESET. ( Reset button is displayed on the survey runtime executiuon which is generated out of XML I believe)

Also the Element & ElementValue structures of Valuation node are the fields with lock - No write access therefore I also can not clear them off in the backend.

I am raising an incident. Let's see what SAP suggest.

Thanks & Regards

Suchita

0
Suchita Phulkar Jun 23, 2017 at 04:36 AM
0

Thanks Guys. SAP is providing a "RESET" action on valuation collection to help us on this requirement.

This action will be PSM released on weekend of 8 July & thus will be helpful in future to anyone who want to Reset a survey via backend.

Regards

Suchita

Share
10 |10000 characters needed characters left characters exceeded