Add new fields to default view when creating fields via REST in sharepoint 2013

Hello,
When I add new fields via REST in a list, they don't appear in the default view for that list.
Here is my code in case you need it:
public function creeChamp(nomListe:String, champ:String, type:int, requis:Boolean):void
postURL.data = JSON.stringify({ '__metadata': { 'type': 'SP.Field' }, 'Title': champ, 'FieldTypeKind': type,'Required': requis, 'EnforceUniqueValues': false,'StaticName': champ});
thanks

You need to add the field to the view as well.
Here is the API.
Our code looks pretty different because I'm working in AngularJS, but here's a snippet from a working example:
$http.post(siteUrl + "/_api/web/lists/GetByTitle('" + listName +
"')/Views/GetByTitle('All%20Items')/ViewFields/addViewField('" + columnName + "')",
// POST data is empty for this request
}, getPostConfig())
.then(function (response) {
deferred.resolve("Added column to view");
.catch(function (response) {
deferred.reject('Error ' + response.status + ': ' + response.data.error.message.value)
Bottom line is you just POST to this URL however you normally do - except no data:
"/_api/web/lists/GetByTitle('" + listName + "')/Views/GetByTitle('All%20Items')/ViewFields/addViewField('" + columnName + "')",
Hope this helps!
- Bob

Similar Messages

  • Address book model is not respected when I add new fields

    Hello,
    If I add new fields in the model of my adress book. AddressBook display does not comply with the specified model.
    For example, after father, mother and joint, I added the following fields child 1, grand-child 1, child 2, grand-child 2, child 3, grand-child 3, child 4, grand-child 4, in order to have descendants of my friend or family.
    The result is :
    child 3 : Oscar
    child 4 : Anatole
    child 2 : Victor
    child 5 : Constantin
    child 1 : Aline
    Please note that I entered the 5 children in the good order : Aline, Victor, Oscar, Anatole, Constantin.
    An other example can be completely different with children and grand-children mixed !
    To be complete, I can say that in Mac OS X 10.4 address book was running correctly, but is no longer running in 10.5 nor 10.6.7
    Best regards
    Bergama

    The iPad can't be infected with a virus - by the definition of a virus being a malicious program that replicates itself across your operating system and other programs. It can be infected with malware, however that usually only happens when a user taps on a link, or actively does something.
    Since the iPad can't run flash or java (?)(all or most kinds of java) then it's relatively secure.
    You're probably fine.
    The iPad's operating system is different enough from Mac's or PC's that even if you do tap on a virus it can't run...the malicious code is speaking a language that the iPad can't understand.

  • How to add new fields in Reduced message ( in BD53 )

    Hi Experts,
    How to add new fields in Reduced message ( in BD53 ), when the required field iis available in Table or Structure and need to be added in BD53 so that we can ALE.
    Thanks,
    Ninad

    Hello,
    I think of something like:
    First, you create extension, with transaction WE30.
    Then, reduce your idoc, your extension should also be proposed.
    Do not forget to add this extension in outbound we82, and/or we57 in inbound, and WE20, and find BTE or exit to populate extension.
    regards.
    F.S.

  • PLz Help me its urgent, how to add new field in mm01 basic data screen

    Hi everyone,
         plz tell me how to add new field in mm01 basic data screen,i added that field in basic data screen but when i create a material the data for that field will not save in database table.
    Thanks,
    murali.

    Hi Murali,
    when created added a field on the screen by using user exit then after that you have add the field in main table where you will be getting these table in the userexit only, please make sure about this. And i am sure defenitly it will get updated in to the table.
    reward if useful.
    thanks
    abdulsamee.

  • IDOC - add new field in in existing segment definition

    Hi,
    For segement type say Z1MARA1 if we need to add a new field in segement definition say Z2MARA1 SAP is not allowing to add new field if we tried to cancelled the realsed 30E it not allowing since the SAP realease which we are working is 640 so only we can create new segement defination with version Z2MARA1001 with new field added but issues is that the partner Profile for outbound parameters the Segment release in IDOc Type is 31I so if we change this segment release in IDOC type to new version ie., 640 then it will pick all the new segement associated with it due to which the the format in which we pass the segements to third party will change so is there any way to use the existing segment definition which is release 30E & add addition field to it. Only one way I found is that when i try to cancel the released message is trigger so in the debug if I make it success it allows to add new field in existing segment definition but which is wrong way of doing is there any way we can used same segment definition & add new field without adding new version & new released.
    Thanks in advance.
    Rajeev

    Varma,
    I know that we can add new segement with new version my question is existing segement definition can we add a new filed because in partner profile we specified release 31i so even we create new segement type then version will be 640 so it will not pick the latest version.
    Thanks
    Rajeev

  • Report RCATS_DISPLAY_ACTIVITIES to add new fields

    Hi  SAP Gurus ,
    I have a req to add new fields from a table ZCS_ENGINE to the report RCATS_DISPLAY_ACTIVITIES . 
    I copied the program and create a Z report ZRCATS_DISPLAY_ACTIVITIES , but i am facing difficulties to add new fields
    to the fieldcatalog.
    Can u please tell the procedure to add fields into the layout and show the output ..
    Advance Thanks,
    Thanks,
    AMS
    Moderator message: too vague, please describe problems in all technical detail when posting again, what is "difficulties", is it classical, ALV, class based ALV, what have you tried so far, please search for available information on fieldcatalog and layouts before asking.
    Edited by: Thomas Zloch on Oct 19, 2010 3:28 PM

    hi,
    as per your requirement (3 fields you mentioned )not inthe standard .you have to contact technical team for new report or enhance ment.
    regards
    muthuramand

  • Add new field in Web UI

    Hi
    I want add new field in view GS_CM/AddDoc.
    I have studied a documentation http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/509a21a9-24be-2b10-d39b-de4c6b3fc222
    but for a component GS_CM the button "Create New Field" is inactive.
    Can I add the my field in views GS_CM/AddDoc ?

    Hi,
    open component GS_CM in tx BSP_WD_CMPWB.
    Here open your view AddDoc.
    Before you will be able to add new fields you have to enhance this view (right mouseclick on view).
    Now navigate to the context nodes. This view has 3 context nodes. Decide where to add your and add it using the assistant by right click on "Attributes". Before you do this check in the UI configuration the available fields. Maybee there is already the field available you require.
    I hope this helps.
    Regards
    Manfred

  • How to add new fields to Profit center screen (KE51)

    Dear All,
    I have a requirement that to add new fields to the Create Profit center screen KE51.
    I couldn't find the user exits for the same.
    Please help me in this.
    Thanks.
    Ravi

    Hello Ravi,
    I must respcetfully disagree(with other posts) that it is not possible to extend CEPC.  In our system we have added an append with two new fields to CEPC.  Now, that was the easy part. You must also find a way to maintain those fields when creating and changing profit centres.  To do this it was necessary for us to add a button to the create/modify screens.  It was also necessary to find a few enhancement spots in order to make this work(and it still is not perfect).   I am being very vague here because even though it is posible I would not recommend implementing this solution.  It was very time consuming and could be risky if you miss something.  There is a reason why you can find so little information in SDN and other places about how to do this.  Other, including myself have tried but it was painful.
    I know that this does not help very much.
    Regards
    Greg Kern

  • How to add new fields for ESS leave request

    Hi friends,
    Can u please help me with my issue.......
    My issue is to add new fields in ess/leave request i.e...
    The component needs to be Checked-out through Net Weaver Development Infrastructure, make the necessary enhancements, and finally Check-it-in back to NWDI.
    Custom Function Modules are to be invoked apart from the standard ones that are already available in the Leave Request component – ess~lea inorder to accommodate the extra absence-type logic.
    can u please sujjest me where should i make changes in the given 14 components
    means in which view i have to add these fields.................
    Regards
    Rajesh

    Hi Rajesh ,
    Check whether u are able to find the ess dc's under inactive dc's in webdynpro
    If ur not able to find it then Check the landscape configurator in CMS and also the transport studio and confirm that ess packages are imported fine
    Ganesh ,
               for creating a DTR client u need to open the DTR perspective right click and "create clients" before that go to windows ->preferences of the NWDS and check the development infrastructure URL is gven correctly ...try pinging it once...
    Do check ur SLD is up or not!!!
    Regards
    Krishna
    Message was edited by:
            krishnagopal Mukundan

  • How to add new fields in Web UI where AET is not applicable

    Hi,
    We tried to add new fields using AET, but surprisingly 'Create Field' is in disabled mode in AET Configuration.
    We are trying to add custom fields to the view GSTEXT/notes. But we could not do that.
    what are the other possible ways to add custom fields and the required configuration for that.
    Your help and suggestions will be highly appreciated.
    Best regards,
    Venkat

    Hi,
    Thanks for the response, We want to add two custom fields in Component / View (Gstext / Note).
    We are trying with AET tool, But in AET tool configuration window, ''Create Field'' is in not in active mode (disabled mode), we can see it but it is not clickable.
    In order to proceed and create new fields it has to be in enabled.
    Kindly suggest me how to activate this field. your suggestions will be highly apprecaited.
    Thank you
    Venkat

  • How to add new fields in SAP-Query

    Hi,
    Can any body tell how to add new fields to the existing query.
    Thanks a lot,
    Bhaskar.

    hi,
    when we create internal tables like. in final table you can include the extra fields.
    data : begin of itab_mara,
             matnr like mara-matnr,
             erdat like mara-erdat,
             end of itab_mara.
    data : begin of itab_marc,
             matnr like marc-matnr,
             werks like marc-werks,
             end of itab_marc.
    data : begin of itab_final,
             matnr like mara-matnr,
             erdat like mara-erdat,
             werks like marc-werks,
             date like sy-datum,
             status(10) type c,  * new fields
             end of itab_final.
    <select statement>.
    Append all the fields to itab.
    loop at itab_final.
    write :/ itab_final.
    endloop.
    Reward with points if helpful.
    Message was edited by:
            Vinutha YV

  • Add new field infotype "z" in logical database selection screen pnp

    Can add new field infotype "z" in logical database selection screen pnp
    I could explain how to realize
    Thanks

    In case to somebody it interests to him: TO EXTEND SCREEN OF SELECTION WITH OPTIONAL DELIMITERS The case that can be given in a screen of selection of a logical data base it does not appear a certain field that we need in the filter, the steps that will be due to follow are the following:
    u2022 To create a view of selection in agreement with the fields that we want to show To review the following Link http://help.sap.com/saphelp_46c/helpdata/es/6e/6ed638e70ef679e10000000a114084/content.htm u2022 To assign the view of selection to a class of report
    u2022 In the code of report to create select option in the selection screen that allows to introduce imput to leak and after start-of-selection to put the following code,
    "Allocation operative area to optional delimiter
      IF NOT p_aroper IS INITIAL.
        DATA: lt_texpr TYPE rsds_expr OCCURS 0 WITH HEADER LINE,
              wa_texpr TYPE rsds_expr,
              lt_rsds_expr_tab LIKE rsdsexpr OCCURS 10 WITH HEADER LINE,
              wa_rsds_expr_tab LIKE rsdsexpr.
        REFRESH lt_rsds_expr_tab.
        wa_rsds_expr_tab-arity = '0'.
        wa_rsds_expr_tab-fieldname = 'OBJID'.
        wa_rsds_expr_tab-option = 'EQ'.
        wa_rsds_expr_tab-low = p_aroper.
        wa_rsds_expr_tab-high = '00000000'.
        MOVE-CORRESPONDING wa_rsds_expr_tab TO lt_rsds_expr_tab.
        APPEND lt_rsds_expr_tab.
        REFRESH lt_texpr.
        wa_texpr-tablename = 'PA9004'.
        wa_texpr-expr_tab[] = lt_rsds_expr_tab[].
        MOVE-CORRESPONDING wa_texpr TO lt_texpr.
        APPEND lt_texpr.
      pnpdynse[] = lt_texpr[].
      ENDIF.
    English is the forum language.
    Edited by: Rob Burbank on May 18, 2011 11:41 AM

  • Cannot Add new fields to standard QM datasource

    Hi
    I got this erro when I try to add new fields from LBWE.
    Field ZZRFKIMG cannot be selected because of unit field VRKME -> see long text
    Message no. MCEX032
    Diagnosis
    Field ZZRFKIMG cannot be transferred, since its unit field VRKME is either not in the communication structure, or was purposefully excluded from the selection.
    Procedure
    If you have chosen your own field, you must also create a user-defined unit field in the append and use it accordingly.
    How can I resolve it.
    thanks

    Hi,
    My Understanding is that if the field is available in the Pool in LBWE then no need to enhance the datasource.
    In my case the field is available in LBWE though it is ZFIELD (ZZRFKLMG and ZZNETPRC).
    In RSA6 I added the this unit
    ZZMEINS     MEINS     UNIT                                                                           Base Unit of Measure
    ZZWAERK     WAERK     CUKY                                                                           SD Document Currency
    I went back to LBWE and try to add the following Zfieds (ZZRFKLMG and ZZNETPRC) and the error is same.
    Now I try to add the the field directly in the append structure * ZZMC05Q02ITM* but its asking to maintain the ref table and ref field.
    I added ZZMC05Q02ITM as ref table and ZZRFKLMG as ref unit and  I still get errors.
    I am are that if I maintain it in RSA6 then I need to write user exit in CMOD but since it is available in LBWE I want to get it from the pool.
    I have tried this and there was no errors during activation
    ZZRFKLMG     ZZRQE_RFKLMG     QUAN     QMFE     ZZMEINS     Notification quantity in base units
    I gave the table name and Unit.
    Despite adding it, I still get data even though I did not used LBWE pool.
    thanks alot SUV123
    Edited by: Bhat Vaidya on Oct 14, 2009 10:44 AM
    Edited by: Bhat Vaidya on Oct 14, 2009 11:06 AM

  • Add new fields in F-36 ( Add customer item dynpro ) .

    Hi all.
    I want to add new fields in "Add Customer item" Dynpro of transaction F-36. It's possible ???. How I can do this ??
    In the "More Data" dynpro is possible to add new fields ????
    Thanks a lot
    Ismael

    Hi
    Sorry...I wanted to say I want to add a customer fields of table BSEG.
    Only I want to know if it's possible to add some fields in a f-36 trx.
    My users want to fill a new fields when they create new bill of exchange ( in dynpro "add customer item").
    thanks

  • CRM - Add New Field in Competitor Product Screen

    We are looking for the right way to enhance the competitor product screen (object prod_cp) in CRM 7.0. We have explored several options and we would like to have a confirmation that we selected the right option for the CRM level we are on now. We checked enhancement options via eewb and aet. However, in transaction axtreg there are 129 objects that can be enhanced but object prod_cp is not part of that list so I assume both tools mentioned cannot be used to enhance the competitor product screen (we want to add new fields and put business logic behind it). Is this a correct conclusion? I based the conclusion on post below:
    AET enhancement capabilities
    Found a OSS note 1088910  which looks like something we could use instead in CRM 7.0:
    appl enhancement          component view for customer
    Competitor products (PRDCP)     PRDCPOV/CustomHeader
    Is this correct?
    If this is not correct, how can we enhance the competitor product screen without changing the sap standard code (like append a Z structure to table comm_product_idx and then....are there any enhancement sports for this screen where we can add our custom code?). Do we have to use the framework enhancement concept?
    Also found OSS note 1448299 that provides information about business functions for the Application Enhancement Tool (AET) in SAP Enhancement Package 1 for SAP CRM 7.0 and I saw that we will be able to enhance the competitor product screen as soon as we have upgraded to Ehp 1 just by switching on business function crm_inf_1. Is that correct?
    Rgds,
    Josephine

    Hi Josephine,
    You can enhance any standard CRM 7.0 component. follow this wiki on how to enhance standar CRM7.0 components
    http://wiki.sdn.sap.com/wiki/display/CRM/HowtoGuide-EnhancingtheUIinCRM+7.0
    You have two options to add new field to the competitor product screen
    1. Using AET. Application Enhancement Tool, require very limited technical knowledge and i believe even function person can add a new field on the webui screen using AET. Search sdn with AET and you will find lot of information.
    2. Create a z table with the new field value and product id (unique key).
        Create a value node in the standar component.
        On load of the webui screen fetch the details of the new field from the ztable and display it
        On the save of the webui screen if the value of the new field has changed update the z table.
    Regards

Maybe you are looking for

  • How can I tell what microprocessor my computer has

    How can I tell what microprocessor and operating system I have on my Mac? Also wheter it is 32 or 64 bit? How much RAM? I want to purchase software, but not if it won't work.

  • Transport order with two 351

    Hi I have this question: I am doing the UB transport order withoput delivery. When the GI is processed, it is used the 351 correctly. when I do the 101 for the GI, the 101 is used to receive the material correctly. When I go into MB51 I can see 2 mov

  • Using WebDAV...

    Mark, can the WebDAV functionality of the protocol server (Oracle Ent. Edition 10.2.0.2) be used for document storage? I'm thinking of using the Oracle WebDAV functionality in combination with confluence (http://www.atlassian.com/software/confluence/

  • Lenovo Vibe X( S960) hangs on while uploading the images into Whatsapp.

    Hi , I purchased the Vibe x(S960) 3 days back and when I try to upload photos in the Whatapp, mobile hangs and not even able to come out of that problem. Needs to wait until battery gets dry. ( some time I have wait for more than 3 hours to battery g

  • Search For Specific File Type (eg .txt)

    I know how how to find files in a folder using Java but how do you search for specific file types. I am looking only include files with the extension .txt in my search.