Survey:Add formula to survey field

Hi ,
I have the requiement that I need to add a  field in the survey (CRM_SURVEY_SUITE)  , that should be calculated based on the values entered by users.
Input field - A - 80 (user enters)
Input filed - B - 100 (user enter)
Input field - C should be filled with 80%(calculated using formula).
This calculation shuould be calculated on survey save(Function code SUBMIT) button.
I checked PAI and PBO function modules , I can't find where to enhance and keep my formula.
Please help ..
Thanks,
Naveen.

Hi Naveen,
Thanks for the update.
I checked your requirement for field level calculations. The Surveys can be completed in GUI, Webclient by internal users or using HTML format by external users. If you are  using the survey's for internal users who have access to SAP CRM system you can consider writing the code logic in the PBO module. However, for the HTML format the survey will be filled outside the CRM Landscape (probably through some website), the PBO module cannot be used to control the calculations dynamically.
To be consistent and scalable between diferent survey formats, we need to write all the the field level logic (calculations or Validations) in the survey's XSLT files using JAVA Script.
This would ensure that the survey's can run in any formats without any code change.
Hope this helps.
Moderation: Bargains for points is prohibited on SCN. Please avoid this. Thank you.

Similar Messages

  • Formulas and updating fields

    I have a PDF document that has a bunch of forms to calculate mileage, etc. I have entered formulas into "total" fields, but once i fill in the other fields, the "total" number does not update. Is there a secret trick to making the number automatically update or is it possible that my formula is just wrong? It's in simplified field notation as "Ending MileageRow1 - Beginning MileageRow1."  (Ending MileageRow1 is the name of one field and Beginning MileageRow1 is the name of another.) Any help with this would be great!

    The field calculation order is not correct. To set it, go into forms editing mode (Forms > Add or Edit Fields) and then select "Forms > Edit Fields > Set Field Calculation Order". Set the order to whatever makes sense for your form.

  • How to add a new metadata field to iPhoto where new field is calculated as age in years and month based on a specific date and the date photo was taken ? I want to calculate and display the age of my two kids on every photo.

    Hi
    How can I add 2 new metadata-fields to every photo in iPhoto ?
    The new fields should state the age of my kids in years and months based on the date that they were born and the date that photo is taken.
    Exampel:
    My son is born 01.01.2010
    My daughter is born 01.01.2012
    Photo taken by data
    Aage of son
    Aage of daughter
    01.07.2011
    1 year 6 month
    not born yet
    01.01.2014
    4 year 0 month
    2 year 0 month
    I would like to be able to search by kids age and get the info displayed when doing slideshows.
    How to do this in iPhoto ?
    Any alternatives to accomplish the same ?
    Kind regards

    It can't be done with iPhoto.  There are some DAM (digital asset management) applications that can write to other IPTC fields that iPhoto can't read. One such app is Media Pro 1.
    However you would have to calculate the age for each date and add it to one of the fields. There are online age calculators that can do that for you: Age Calculators
    If you go thru that much trouble then use iPhoto, make the calculations and add the age to the Description field.  Then you can use Smart Albums to search for 1year 6 month text.
    OT

  • Ordering of formula and summary fields - Reports6i

    Hello,
    I want to know if it is possible to make certain order of field (XML tags) in XML.
    If I have ordinary field that I get from SQL I can put it in the place that I want it to be and position in xml is OK, but when I put formula or summary field on certain place in xml file it is always on last place.
    For example:
    I have sql with 3 fields (one, two, three) and two formula fields (fo1, fo2). In report they are in this order:
    1. one
    2. fo1
    3. two
    4. fo2
    5. three
    but in xml file I get this order:
    <body>
    <edp:bodyContent>
    </one>
    </two>
    </three>
    </fo1>
    </fo2>
    </edp:bodyContent>
    </body>
    and I wish to have this order in xml:
    <body>
    <edp:bodyContent>
    </one>
    </fo1>
    </two>
    </fo2>
    </three>
    </edp:bodyContent>
    </body>
    Is this possible and if so how?
    Thanks for your help

    Finally, I got the fix.
    Here is what I did: Instead of the format mask '000' or '099' or '0nn' I used '000Y'
    adding a Y supresses the extra space that is reserved for + or - sign. And supression need to be added at the end like I showed, not like 'Y000'.
    Now my data looks like this, which is what I wanted:
    04/23/20120020123.451234.5610/24/2008
    If you look close, there are no spaces now as compard to my previous data line.
    Thank you all both for spending some time and giving me pointers.

  • Can I add a text form field in Photoshop that can be edited in Acrobat reader?

    I design coffee labels with Photoshop then send them off to the printers. The printers then open up a PDF and put in the best before date before printing. At the moment I have to add the text form fields using Acrobat Pro after i've saved the photoshop document as a Photoshop PDF. The problem is if I want to edit the labels at a later date, I have to re-add the text form fields with Acroabat again. 
    Can I add a text form field in Photoshop that can be edited in Acrobat reader? Is it better to use another program for this task?
    Thanks in advance
    Ian

    As A1's Calculate script, under "Simplified field notation", enter:
    A * 0.8
    The same goes for B1 and B, resp.

  • I need to add check whether 21 fields of a internal table are empty or not.

    Hello,
    I need to add check whether 21 fields of a internal table are empty or not.How can we write a code for the same wand what would be the correct syntax for it.
    I tried entering all the fields in the IF loop with AND condition but its giving syntax error.Perhaps this is because the lenght of the IF condition would be more than the allowed one.

    Hi,
    After the select quiery.
    If not itab is initial.
    Message 'Table is not empty'    type 'I'.
    Endif.
    Regards,
    Jagadish.

  • Is there a way to simultaneously add text to Comments field for multiple files?

    Is there a way to simultaneously add text to Comments field for multiple files? I know I can use Option+Comman+i to bring up the Inspector window but it doesn't have a Comments field. For example, in iTunes you can select multiple files and change metadata for any field simultaneously and easily yet when it comes to the Comments field in the Finder, this seems to be missing.
    In our production environment, Comments field is important because we place notes about what drive the file originated then when it gets transferred to LTO-6 tape via LTFS, we can quickly trace it in the event we needed to recreate the hard drive. Because tape archiving is linear, we can't store all of the files on the same tape.
    We've tried using Apple's Automator but it too seems to not have a way to batch change text in the Comments field. Any help is appreciated.

    What is "order data"?

  • Add a new key field in an InfoObject

    Hi all,
    I have to add a new key field in a standard InfoObject (0vendor) in order to extract data correctly from a table in R3 which has both the vendor and the plant as keys.
    Doubts:
    1. the 0vendor InfoObject is already used in several InfoCubes
    2. it contains data
    3. we have another object built with reference to 0vendor
    Any problem with the existent InfoCubes and queries if I change the structure of this InfoObject?
    Have I got to delete data on it first?
    any problem on the object built with reference to 0vendor?
    I have just thought of updating the object 0vendor (this would avoid lots of substitutions and lot of work) instead of developing a brand new object..
    Do you agree with this kind of solution or would you do something different?
    Thanks
    Elisa

    Hi Elisa,
    "In R/3 the vendor sub-range is blank and we use only one Purch Org, so no matter."
    This is OK but remind that it shall remain like this ALWAYS; because if you design your model with these assumptions and later you start getting sub ranges and/or a second P.O then you can forget your model...
    Replacing 0VENDOR by ZVENDOR completely will depend on your requirement; I don't know which content you are using but you should try to keep 0VENDOR as such because ZVENDOR will be compounded with 0PLANT and that's not the same... (e.g. the key will be displayed like "PLANT/VENDOR" in reports unless you drilldown the PLANT in front of ZVENDOR... your users may perhaps not appreciate...)
    In this matter, how are you going to proceed?
    - fill the vendor ID in ZVENDOR and have 0PLANT as compounding key? In this case you'll have to add 0VENDOR attributes in ZVENDOR as well. With this scenario you will end with redundant data since attributes for 0VENDOR will be the same for each combination 0PLANT/ZVENDOR.
    - wiser: have 0VENDOR and 0PLANT both in the compounding key. This way you could have ZVENDOR key CHAR1 and leave it empty (it would be a "dummy" key you wouldn't use in reports)
    The good thing here is that you don't have to replicate your 0VENDOR design in the ZVENDOR. the bad thing for you is that you NEED to keep both IObjs; thus manage your DIM issue.
    Your approach to fill the cubes is absolutely right! What are the sizes of your cubes?
    You should take this opportunity to check you cubes datamodel:
    - are the dimension well deisgned? (run report SAP_INFOCUBE_DESIGNS in order to see the cardinality of your DIMs). I am sure this can be improved.
    - are the cubes partitioned? Every cube should be partitioned for performance reasons.
    - if the cubes are huge, wouldn't it be good to do a logical partitioning? E.g have one cube per year and a multicube on top...
    Finally use dimension number range buffering when loading data into an empty cube and other techniques like dropping all indexes in order to speed up your load process and minimize reporting downtime. If your reports are based on multicubes and your model is not too complex you could even keep the copy cube instead of moving your data back to the original; you would then just have your multicube transport to make the switch of the new model available for reporting...
    hoping this help you to go with the right path...
    regards,
    Olviier.

  • How to create Formula based value field in COPA

    Hi,
    I want to know how to create formula based  value field in COPA
    My Requirement is i want to collect some value in formula based value field and want to use in copa allocation cycle as a tracing
    factor.
    anybody give some light on the same topic or requirement ?
    Thanks
    Nilesh R

    The key figure you are creating in KE2K is not a value field, i.e. you can't post to it and you can't use it in a report. It is a caluculated value that can be used only in assessment and top-down-distribution.
    In Ke2K, enter a name for your key figure, then click on the the white sheet button to create it. Now the formular area is open for input. Input your formular (e.g. VV001 + VV002 - VV003 .... where VVXXX are the technical names of value fields).
    Now click the "check formuar"-button. Then save.
    Before you can use the key figure in assessment, execute TC KEUG.
    Now the key figure is available as any value field in the tracing factor selection of your assessment cycle.
    I hope this made it clearer.
    Regards
    Nikolas

  • How to add a User Defined Field in OUBI

    Dear Experts
    I would like to find out how to add a user defined field into OUBI from a Customer Care & Billing source system. If anyone could list the steps involved or point me toward a source of documentation that sets out the steps involved it would be much appreciated.
    Cheers
    Tim

    Is there anyone out there who has had experience using OUBI with CC&B?

  • How to Add a user defined field in transaction-PKMC?

    Could anyone tell me the step by step process of how to add a user defined field in transaction-PKMC?
    Moderator message: please do some research before posting.
    Edited by: Thomas Zloch on Jan 16, 2012

    Is there anyone out there who has had experience using OUBI with CC&B?

  • How do I add a yahoo search field to my toolbar so I can always see it?  It used to be there until a month ago and now is gone.

    how do I add a yahoo search field to my toolbar so I can always see it?  It used to be there until a month ago and now is gone.

    If you either updated to Mountain Lion or updated to Safari 6 under Lion then there is a unified URL address bar with the search. I personally don't like it either.

  • Add a new date field

    Hi,
    I have a requirment to add a non existing field to my query
    My actual query is like this..
    select Date ,count(*) from tablename where date is between dt1 and dt2;
    The output will be displayed for all the dates where some transactions are there..
    eg:
    Date                     Count
    25.12.2005 12:02:00 PM          1
    25.12.2005 12:16:00 PM          1
    25.12.2005 12:20:00 PM          3
    25.12.2005 12:51:00 PM          1
    25.12.2005 12:52:00 PM          5
    but the business wanted me to add an additional column which is a date field..
    ie to display all the dates between dt1 and dt2 and the other 2 fileds from the query
    if Dt1=25.12.2005 12:00:00 and Dt2=25.12.2005 12:59:00 then my output should look like this :
    Column1                Date                    count
    25.12.2005 12:00:00 PM
    25.12.2005 12:01:00 PM
    25.12.2005 12:02:00 PM     25.12.2005 12:02:00 PM          1
    25.12.2005 12:03:00 PM
    25.12.2005 12:04:00 PM
    25.12.2005 12:05:00 PM
    25.12.2005 12:06:00 PM
    25.12.2005 12:07:00 PM
    25.12.2005 12:08:00 PM
    25.12.2005 12:09:00 PM
    25.12.2005 12:10:00 PM
    25.12.2005 12:11:00 PM
    25.12.2005 12:12:00 PM
    25.12.2005 12:13:00 PM
    25.12.2005 12:14:00 PM
    25.12.2005 12:15:00 PM
    25.12.2005 12:16:00 PM     25.12.2005 12:16:00 PM          1
    25.12.2005 12:17:00 PM
    25.12.2005 12:18:00 PM
    25.12.2005 12:19:00 PM
    25.12.2005 12:20:00 PM     25.12.2005 12:20:00 PM          3
    25.12.2005 12:21:00 PM
    25.12.2005 12:22:00 PM
    25.12.2005 12:23:00 PM
    25.12.2005 12:24:00 PM
    25.12.2005 12:25:00 PM
    25.12.2005 12:26:00 PM     25.12.2005 12:26:00 PM          1
    25.12.2005 12:27:00 PM
    25.12.2005 12:28:00 PM
    25.12.2005 12:29:00 PM
    25.12.2005 12:30:00 PM
    25.12.2005 12:31:00 PM
    25.12.2005 12:32:00 PM
    25.12.2005 12:33:00 PM
    25.12.2005 12:34:00 PM
    25.12.2005 12:35:00 PM
    25.12.2005 12:36:00 PM
    25.12.2005 12:37:00 PM
    25.12.2005 12:38:00 PM
    25.12.2005 12:39:00 PM
    25.12.2005 12:40:00 PM
    25.12.2005 12:41:00 PM
    25.12.2005 12:42:00 PM
    25.12.2005 12:43:00 PM
    25.12.2005 12:44:00 PM
    25.12.2005 12:45:00 PM
    25.12.2005 12:46:00 PM
    25.12.2005 12:47:00 PM
    25.12.2005 12:48:00 PM
    25.12.2005 12:49:00 PM
    25.12.2005 12:50:00 PM               
    25.12.2005 12:51:00 PM
    25.12.2005 12:52:00 PM     25.12.2005 12:52:00 PM          5
    25.12.2005 12:53:00 PM
    25.12.2005 12:54:00 PM
    25.12.2005 12:55:00 PM
    25.12.2005 12:56:00 PM
    25.12.2005 12:57:00 PM
    Thanks
    Vamsi

    You can do it with the SQL Model clause:
      1  with t1 as
      2  (select to_date('07/02/2007 12:02:00', 'DD/MM/YYYY HH24:MI:SS') mydate from dual UNION ALL
      3   select to_date('07/02/2007 12:26:00', 'DD/MM/YYYY HH24:MI:SS') mydate from dual)
      4  select newdate, mydate
      5  from t1,
      6      (select newdate
      7       from dual
      8       model
      9       dimension by (to_number(null) as myid)
    10       measures (to_date(null) as newdate)
    11       rules upsert iterate(1000) until (&startdate+((iteration_number-1)*((1/24)/60)) >= &enddate)
    12             (newdate[0]=to_date(&startdate),
    13              newdate[iteration_number+1]=newdate[cv()-1]+((1/24)/60))) t2
    14  where t1.mydate(+)=t2.newdate
    15* order by newdate
    SQL> /
    Enter value for startdate: to_date('07/02/2007 12:00:00', 'DD/MM/YYYY HH24:MI:SS')
    Enter value for enddate: to_date('07/02/2007 12:30:00', 'DD/MM/YYYY HH24:MI:SS')
    NEWDATE              MYDATE
    07-FEB-2007 12:00:00
    07-FEB-2007 12:01:00
    07-FEB-2007 12:02:00 07-FEB-2007 12:02:00
    07-FEB-2007 12:03:00
    07-FEB-2007 12:04:00
    07-FEB-2007 12:05:00
    07-FEB-2007 12:06:00
    07-FEB-2007 12:07:00
    07-FEB-2007 12:08:00
    07-FEB-2007 12:09:00
    07-FEB-2007 12:10:00
    07-FEB-2007 12:11:00
    07-FEB-2007 12:12:00
    07-FEB-2007 12:13:00
    07-FEB-2007 12:14:00
    07-FEB-2007 12:15:00
    07-FEB-2007 12:16:00
    07-FEB-2007 12:17:00
    07-FEB-2007 12:18:00
    07-FEB-2007 12:19:00
    07-FEB-2007 12:20:00
    07-FEB-2007 12:21:00
    07-FEB-2007 12:22:00
    07-FEB-2007 12:23:00
    07-FEB-2007 12:24:00
    07-FEB-2007 12:25:00
    07-FEB-2007 12:26:00 07-FEB-2007 12:26:00
    07-FEB-2007 12:27:00
    07-FEB-2007 12:28:00
    07-FEB-2007 12:29:00
    07-FEB-2007 12:30:00
    07-FEB-2007 12:31:00
    07-FEB-2007 12:32:00
    34 rows selected.Have a look at the Oracle documentation to see exactly how this works, but basically my inner query:
    select newdate
    from dual
    model
    dimension by (to_number(null) as myid)
    measures (to_date(null) as newdate)
    rules upsert iterate(1000) until (&startdate+((iteration_number-1)*((1/24)/60)) >= &enddate)
          (newdate[0]=to_date(&startdate),
           newdate[iteration_number+1]=newdate[cv()-1]+((1/24)/60))is building a dummy table containing values 1 minute apart between startdate and enddate. You can then join to the original table. Not sure how clear that is so ask away if you're confused (but I would advise you go to the Oracle doc's first and search for info on the model clause).
    Martyn

  • How to use ADD_METADEF to add a custom metadata field

    Hi All,
    I am trying to add a custom metadata field to check in profile, and this I want to do using RIDC library through my java program. I have tried the following code, but some how I could not see its getting added to Information Fields and also to Standard check in profile.
    Can you let me know what am I missing?
                myIdcClient = myIdcClientManager.createClient("idc://XXXX:4444"); // just commented out
                IdcContext myIdcContext = new IdcContext("weblogic", "weblogic1");
                ServiceResponse myServiceResponse = null;
                  DataBinder myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "UPDATE_OPTION_LIST");
                    myRequestDataBinder.putLocal("dKey", "xLocationList123");
                  myRequestDataBinder.putLocal("OptionListString", "Madrid\nTokyo\nLondon\nWashington");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "ADD_METADEF");
                    myRequestDataBinder.putLocal("dName", "xLocations123123");
                    myRequestDataBinder.putLocal("dIsRequired", "0");
                    myRequestDataBinder.putLocal("dOptionListKey", "xLocationList123");
                    myRequestDataBinder.putLocal("dOptionListType", "choice");
                    myRequestDataBinder.putLocal("dIsOptionList", "1");                    
                    myRequestDataBinder.putLocal("dIsSearchable", "1");
                    myRequestDataBinder.putLocal("dIsEnabled", "1");
                    myRequestDataBinder.putLocal("dType", "Text");
                    myRequestDataBinder.putLocal("FieldName", "xLocations123123");
                    myRequestDataBinder.putLocal("dCaption", "Locations");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    //IdcService=UPDATE_META_TABLE
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "UPDATE_META_TABLE");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "START_SEARCH_INDEX");
                    myRequestDataBinder.putLocal("IsRebuild", "1");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "PUBLISH_SCHEMA");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
    Thanks in advance.

    Try calling the following code:
    import static intradoc.shared.MetaFieldUtils.hasDocMetaDef;
    import static intradoc.shared.MetaFieldUtils.updateMetaDataFromProps;
    import intradoc.common.ServiceException;
    import intradoc.data.DataBinder;
    import intradoc.data.DataException;
    import intradoc.data.Workspace;
        protected static void addMetadataFields(final Workspace workspace, final DataBinder binder) {
            traceVerbose("Start addMetadataFields");
            // Parameters for metadata field
            final String[] parameters = new String[] { "dsdComponentName", "dComponentName", "dsdVersion", "dType", "dIsRequired", "dIsEnabled", "dIsSearchable", "dIsOptionList", "dOptionListKey", "dOptionListType", "dDefaultValue", "dOrder", "dIsPlaceholderField", "dsdCheckFlag",
                    "dsdDisableOnUninstall" };
            // Common values for primary and alternate field values
            final String[] values = new String[] { "ComponentName", ComponentName, "build_1_20131206", "BigText", "0", "1", "1", "0", "", "", "", "2500", "0", "", "" };
            // Primary file checksum field parameters and values
            final Properties field = new Properties();
            for (int i = 0; i < parameters.length; i++) {
                field.put(parameters[i], values[i]);
            // Setup primary file specific parameters
            field.put("dName", "Metadata field name");
            field.put("dCaption", "Metadata field caption");
            try {
                // Name of metadata field
                final String fieldName = field.getProperty("dName");
                trace("dName: " + fieldName);
                if (fieldName != null && fieldName.length() > 0 && !hasDocMetaDef(fieldName)) {
                    try {
                        updateMetaDataFromProps(workspace, null, field, fieldName, true);
                        trace("Successfully added metadata field " + fieldName);
                    } catch (final ServiceException e) {
                        warn("Metadata field " + fieldName + " was not installed.", e);
                    } catch (final DataException e) {
                        warn("Metadata field " + fieldName + " was not installed.", e);
                } else {
                    trace("Metadata field already exists; will not modify");
            } finally {
                traceVerbose("End addMetadataFields");
    Jonathan
    http://jonathanhult.com

  • How can i add formula to waveform data type?

    I want to interpolate my acquired data in terms of voltage to temperature. For this i need to use polynomial equation, but i am not able to directly attach formula node to the waveform data type. I want to know how can i add formula node to waveform data, and then also have it real time.

    One additional thought that may be helpful. Once you get the Y component of the waveform graph you are going to attempt to wire this into a formula node. You can do one of two things with that array. Put a for loop around the formula node and index the array into and out of the for loop. This allows you to do scalar math on the data. It is also possible to index and array in a formula node. The following KnoledgeBase demonstrates how to do this: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/9d72b6069346942386256a0d00604ed4?OpenDocument

  • How to add a serail no field in components screen in Subcontracting PO

    I need to Create Subcontract PO With BAPI_PO_CREATE1.Its working fine (With Batch).
    My requirement is I need to map one more extra field as Serial No in the Component SCreen.
    How can i add the Serail no field in the Subcontractiong with Components Screen and How to Update that with BAPI.
    Anybody knows the solution,let me know.
    Edited by: ksampath on Feb 8, 2011 3:12 PM

    Thanks for early response Dan.
    As per the document (It is available at  http://www.****************/Tutorials/ABAP/XD01/XD01.htm),
    1) I created the screen group, I created the Badi implementations
    2) Created the Implementation by giving a name and added code the method CHECK_ADD_ON_ACTIVE. and activated it
    3) agian using  Business Add-in: Customer Subscreens  , i created one more implementation and in that added code to GET_TAXI_SCREEN  method. before this i created a screen with a field.and i created a function pool and activated everything.
    4) after everthing i added the field in the kna1 table. when i execute the xd03 transaction code,  i can able to see my own tab ( which i was created) on the screen, and i am able to see the field with blank.
    Now my questions are:
    1) How to write the logic to get the field information from the kna1 when i enter the transaction xd03/.
    2) how to save the field values to kna1 database table when i open it in change mode(xd02) and changed the value.
    and where to write the logic?.
    Please provide me the code snippet if you have any.
    appriciate for your early response.
    thanks again.
    kp

Maybe you are looking for