How to enumerate list items

Hello
I have two lists, one is populated with list of IPs from DB
by httprequest, and another one is empty and accepting drag and
drop for the first list.
Now, I would like to enumerate all dropped IPs in that second
list.
Does anyone can advice me how to do that?
Thnx

"orange_m" <[email protected]> wrote in
message
news:gd3296$obk$[email protected]..
> It`s same like the one I`ve posted:
>
> <mx:List id="ips_list"
> width="194" height="287"
>
> allowMultipleSelection="true"
> dragEnabled="true"
> dragMoveEnabled="true"
> dropEnabled="true" >
> </mx:List>
>
> Data provider for this list is XML(httprequest) in this
format
> <ips>
> <ip>127.0.0.1</ip>
> <ip>127.0.0.2</ip>
> <ip>127.0.0.3</ip>
> </ips>
>
> ips_list.dataProvider = event.result.ips;
>
> For preview these IPs in list, I`m using ItemRenderer
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml">
> <mx:Label id="ip" text="{data.ip}"/>
> </mx:HBox>
>
You can't really drag and drop XML like that. You need to
clone the nodes.
See
http://tinyurl.com/4p88eq

Similar Messages

  • Please tell me how to handle list item in this concern

    please tell me how to handle list item in this concern
    My problem is:
    i have a category table with column categoryname(varchar type)
    I want to display the records of categoryname in a drop down list (i.e., list item )
    So ..please tell me how to do it
    Thanks in advance..

    This code is just a sample from the Help documentation. It won't work until you modify it for your form.
    Why do you have "steps" in your code? You are suppose to do what the steps tell you. You don't place the steps in your code. The steps must be removed from your code.
    Step 1 code goes in a program unit, not in a trigger.
    Step 2 and 3 code usually goes in a trigger.
    You will have to replace the names of the items and record group with your own names as you have defined them in your form.
    step 1: create a procedure in your application
    procedure load_list(itm in VARCHAR2, rg in VARCHAR2) is
    group_id RecordGroup := Find_Group(rg);
    list_id Item := Find_Item(itm);
    Begin
    if Populate_Group(group_id)<>0 then
    Message('Unable to populate record group');
    Raise Form_Trigger_Failure;
    end if;
    Clear_List(list_id);
    Populate_list(list_id, group_id);
    end;
    step 2: create a record group named rg_cat and assign Record Group Query to something like "select categoryname from category"
    step 3: call this procedure as
    load_list('categoryname','rg_cat');

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to enumerate all items in a primary table

    I have a primary table with a data structure as its data element. I also have a secondary table with an index pointing into the primary table.
    Is there an example of how to enumerate all items and reset one of the fields in each element in the primary table to 0?
    thanks,
    chris

    Hello,
    Have you taken a look at the examples directory that come with
    your distribution? You did not mention what platform/version/API
    you are using, but under your Berkeley DB home directory you should find
    examples_c/examples_cxx/examples_java. Under those directories
    is a getting_started directory. I believe that the examples there
    illustrate what you are asking about.
    If you have not done so already, you can also check the sample code
    in the Chapter on "Secondary Databases" in the "Getting Started Guide" at:
    http://www.oracle.com/technology/documentation/berkeley-db/db/gsg/C/indexes.html
    Thanks,
    Sandra

  • How to get List Item attachments name without write any custom code or any database query?

    Hi,
    How to get List Items attachments name without write any custom code or any database query?

    You can get it from Rest,
    There are 2 options,
    1) create a 'Result Source' which has a search query for that List which has attachments 
     - Use rest query to get the 'Filename' , it will have the attachment file name 
    For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be 
    http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
    You can refine the query, be giving proper 'querytext'
    2) Use the List rest api
    For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
    You can get he attachments for 1st item using this 
    http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How to create list items with multiple attachment files using rest api javascript

    In one of user form I am using javascript rest api to create a list item with multiple attachment files. So far I am able to create list item and once created uploading an attachment file. But this is two step process first create an item and then upload
    a file.
    It create an additional version of the item which is not desired. Also I am not able find a way to attach multiple files in a go. Following is the code I am using.
    createitem.executeAsync({
                    url: "/_api/web/lists/GetByTitle('UserForm')/items(1)/AttachmentFiles/add(FileName='" + aFile.name + "')",
                    method: "POST",
                    contentType: "application/json;odata=verbose",
                    headers: {
                        "Accept": "application/json;odata=verbose",
                        "X-RequestDigest": $("#__REQUESTDIGEST").val()
                    binaryStringRequestBody: true,
                    body: fileContent,
                    success: fnsuccess,
                    error: fnerror
    So somehow I need to combine item attributes along with attachment files in body: param. I visited https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItem but no success.
    Appreciate any help.

    Thanks Mahesh for the reply and post you share it was useful.
    But this does not solve the core of the issue. You are uploading attachments after creation of item and multiple files are being attached in loop. This is kind of iterative update to an existing item with attachments. This will end up creating multiple versions. 
    What I am trying to achieve is to create an item along with multiple attachments in a go. No item updates further to attach a file.
    Please suggest how this can be done in one go. SharePoint does it when one creates an item with multiple attachment.
    Thanks for your reply.

  • How to populate List Item from the table in a form builder

    I want to know how to populate the List Item (pop up menu and combo box) from a table.
    Supposing I have a table Customer(cust_id,cust_name)
    and now I want to populate it in such a manner that I can update the data back to the database and also access the list on the form.

    This is the method i am using to populate a list.
    1- First of all you need to create a non-database list item for customer_name.
    2-create this procedure
    PROCEDURE populate_list_with_query
    --Populates the given list item with the specified query.
    (p_list_item in VARCHAR2
    ,p_query in VARCHAR2)
    IS
    /* Name the record group after the list item (no
    block prefix). */
    cst_rg_name constant VARCHAR2(30) :=
    GET_ITEM_PROPERTY(p_list_item,item_name);
    v_rg_id RECORDGROUP;
    BEGIN
    v_rg_id := FIND_GROUP(cst_rg_name);
    IF ID_NULL(v_rg_id) THEN
    v_rg_id := CREATE_GROUP_FROM_QUERY(cst_rg_name,p_query);
    END IF;
    IF POPULATE_GROUP(v_rg_id) = 0 THEN
    POPULATE_LIST(p_list_item,v_rg_id);
    /* Force display of first list element label
    in the list item. */
    COPY(GET_LIST_ELEMENT_VALUE(p_list_item,1),p_list_item);
    END IF;
    END populate_list_with_query;
    3- Create When-Create-Record on the block level and write this code
    BEGIN
    POPULATE_LIST_WITH_QUERY('bk1.customer_name',
    'SELECT customer_name, to_char(customer_id) FROM customer');
    END;
    In this example, the customer name is the (visible) list label and the customer ID is the (actual) list value
    i hope this will solve your problem ...

  • How to download list item attachment from display.aspx

    Im uploading documents
    to list item in list by
    using file upload control. Now I should download that file. I can able to insert documents into list item in attachment column which is predefined but am how can I download the attachments by clicking on the link in display.aspx.
    I have written this for uploadFile controller.
    SPSite site = SPContext.Current.Site;
    SPWeb web = site.OpenWeb();
    SPList list = web.Lists["list2"];
    //SPListItem itemId = list.GetItemById(5);
    int itemId=3;
    SPListItem newItem = list.GetItemById(itemId);
    byte[] contents = null;
    if (FileUpload1.PostedFile != null && FileUpload1.HasFile)
    using (Stream fileStream = FileUpload1.PostedFile.InputStream)
    contents = new byte[fileStream.Length];
    fileStream.Read(contents, 0, (int)fileStream.Length);
    fileStream.Close();
    SPAttachmentCollection attachments = newItem.Attachments;
    string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
    attachments.Add(fileName, contents);
    newItem["CLMSAttachments"] = fileName;
    newItem.Update();
    Thanks in advance.

    Hi ,
    It is your browser that decides to download/open the file.
    If you have compatible client software for the file (word for docx) your computer will by default automatically try to open it.
    But we can force the download. You have to develop a handler/aspx page that will just handle the file download and you have to override the http header "content-disposition" to "attachment;filename=yourfilename"
    Here a sample :
    var fileName = "myfile.sql";
    var r = context.Response;
    r.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
    r.ContentType = "text/plain";
    r.WriteFile(context.Server.MapPath(fileName));
    Hope that will help you
    Moudhafer

  • How to update list item metadata?

    I want to implement lists.asmx > UpdateListItems method. In the update method (the caml) i would like to use barcode as a filter instead of item ID. http://msdn.microsoft.com/en-us/library/office/ms440289(v=office.14).aspx 
    How would my caml look like?
    <Batch OnError="Continue" ViewName="CA28BFCC-4CCE-4EF8-B08F-7824535E13FC">
    <Method ID="1" Cmd="Update">
          <Field Name='BarCode'>6061114511</Field>
          <Field Name="Title">New Title 2</Field>
    </Method>
    </Batch>

    Hi  ,
    You cannot use barcode as a filter instead of item ID by using OOTB  list.asmx. You could build your own custom web service that uses the either the SPQuery class or linq and gather the items based on
    a particular field value.
    For more information, please take a look at the thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/af23f9f0-2640-474c-9616-522fcb639029/listserviceupdatelistitems-update-reference-field?forum=sharepointdevelopmentlegacy
    I recommend that you  update list items with listdata.svc.
    Reference:
    http://chuvash.eu/2011/12/15/update-list-items-with-listdata-svc/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to refresh list item values before report is run?

    We have two SELECT LIST items (drop boxes) on our report. One SELECT LIST has values of "World Region" (e.g. NORTH AMERICA, SOUTH AMERICA, EUROPE, ASIA)
    the other SELECT LIST has values of "Subregion" (e.g. NORTHERN EUROPE, SOUTHERN EUROPE, SOUTHEAST ASIA etc...)
    The values in the Subregion list are dependent on the value that is chosen from the "World Region" List. Can someone tell up how to update the values in the Subregion list BEFORE we submit the page? We can get these values to update (via sql query) when the page is submitted but that is only happening after the report gets run- which is not what we want. We want the user to select a Region from one SELECT LIST and then see all the qualifying Subregions for that Region in the Subregion SELECT LIST. Only after both Region and Subregion have been selected do we want to run the report. Thank for any help on this.

    hey john--
    john) things like Scott's reference to "The name of the LOV Item". What does this really mean?
    raj) in htmldb there's a concept of items at the page and at the app level. page level items have ui component associated with them. in scott's explanation above, he's talking about using a page-level item with a "Display as" type of "select list w/submit" for your first select list. in that case, he's suggesting you have one select list item drive the values of another. when the self-submitting select list submits the page, it sets an htmldb built-in variable called :REQUEST to the name of the self-submitting select list item. in your follow-up post's example, that'd be "REGION_LIST". scott was explaining how you could control the functionality on your page by adding conditions to things like...
    :REQUEST = 'REGION_LIST'
    ...or using declarative Condition options like "Request = Expression 1" and then putting the string "REGION_LIST" in that Expression1 field. so in your case, you have a report region that you don't want displayed until the user's done selecting from your Subregion list. an easy way to handle that would be to add a hidden item (where "Display as" is set to "Hidden") to your page, for example :P1_LAST_REQUEST, to store the last value of :REQUEST. put a Computation on your page that populates :P1_LAST_REQUEST with :REQUEST each time the page is submitted. then put a Condition on your report region that makes it only render when :P1_LAST_REQUEST != 'REGION_LIST'. so this way your users can select a Region and have the page submit itself. the page will then redraw with the values of subregion list correctly populated (you'd presumably use :REGION_LIST in your subregion LOV query to achieve the filtered values) w/o your report region displayed. the user would then select a correct subregion and click some sort of "run my report" button. this time when the page redraws, :P1_LAST_REQUEST would be set so something other than "REGION_LIST" (it'd be set to whatever you named your "run my report button") and so your report region would display as desired.
    hope this helps,
    raj

  • How to Copy list item attachment to document library in SharePoint 2010

    Hi,
    How to Create a folder ("List Item - Title Name") in Document library and copy list items Attachments to the same folder in SharePoint 2010,thanks in advance.
    Regards,
    Selvan.J
    Selvan J

    Hi,
    You should first check whether the folder exists in the library, if the folder not exists, then create it.
    I had modified the code, you can use the following code snippet to achieve it.
    private void EventCopyFileWhenItemCreatedOrUpdated(SPItemEventProperties properties)
    SPSite site = new SPSite(http://YourSiteName);
    SPWeb web = site.OpenWeb();
    SPList doclibList=properties.Web.Lists["YourLibName"];
    bool foundFolder = false;
    if (doclibList.Folders.Count>0)
    foreach (SPListItem fitem in doclibList.Folders)
    if (fitem.Title.Equals("FolderA"))
    foundFolder = true;
    break;
    if (foundFolder == false)
    SPListItem folder = doclibList.Folders.Add(doclibList.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder,"FolderA");
    folder.Update();
    string fUrl = doclibList.RootFolder.ServerRelativeUrl+"/FolderA";
    SPFolder myLibrary = web.GetFolder(fUrl);
    if (properties.ListTitle == "YourListName")
    SPListItem sourceItem = properties.ListItem;
    properties.Web.AllowUnsafeUpdates = true;
    //get the folder with the attachments for the source item
    SPFolder sourceItemAttachmentsFolder =
    sourceItem.Web.Folders["Lists"].SubFolders[sourceItem.ParentList.Title].SubFolders["Attachments"].SubFolders[sourceItem.ID.ToString()];
    //Loop over the attachments, and add them to the target item
    foreach (SPFile file in sourceItemAttachmentsFolder.Files)
    if (CheckFileNameExist(file.Name , properties) == false)
    byte[] binFile = file.OpenBinary();
    myLibrary.Files.Add(System.IO.Path.GetFileName(file.Url) , binFile);
    private bool CheckFileNameExist(string fileNameInFileAttach, SPItemEventProperties properties)
    bool flag = false;
    SPList myDocumentLib = properties.Web.Lists["YourLibName"];
    SPQuery spQuery = new SPQuery();
    SPListItemCollection items = myDocumentLib.GetItems(spQuery);
    foreach (SPListItem item in items)
    if (fileNameInFileAttach == item["Name"].ToString())
    flag = true;
    break;
    return flag;
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Tutorial on how to update list items using ListData.svc

    Can you please point me to a tutorial which shows how to update a list item using listdata.svc and C#?
    Sorry if this is FAQ.
    I have found articles on read list... but I haven't found anything on update a list item.
    val it: unit=()

    when i try this I get an error 500
    I created an ASP.NET web application that allows the user to modify data that is stored in SharePoint I rather not go into the reasons why this application was created but focus more on why doesn't the listdata.svc allow me to update a task item that was
    created by a workflow collect data from user action.
    1. The workflow creates the item.
    I collect the item and update the item using the below code. This is not an OOTB approval workflow that is just the name I used. When I get to save changes I received the following error code.
    Dim getApprovalItem As ExpenseApprovalRuleBasedTasksItem = spContext.ExpenseApprovalRuleBasedTasks.Where(Function(i) i.Id = Pam.ApprovalItemID).FirstOrDefault
    If String.IsNullOrEmpty(getApprovalItem.AuditorApprovalValue) Then
    getApprovalItem.AuditingComments = approvalComments
    Select Case approvalDecision
    Case "Approved"
    getApprovalItem.AuditorApproval = ExpenseApprovalRuleBasedTasksAuditorApprovalValue.CreateExpenseApprovalRuleBasedTasksAuditorApprovalValue("Approved")
    getApprovalItem.AuditorApprovalValue = "Approved"
    Case "Rejected"
    getApprovalItem.AuditorApproval = ExpenseApprovalRuleBasedTasksAuditorApprovalValue.CreateExpenseApprovalRuleBasedTasksAuditorApprovalValue("Rejected")
    getApprovalItem.AuditorApprovalValue = "Rejected"
    End Select
    getApprovalItem.Outcome = "Completed"
    getApprovalItem.Status = ExpenseApprovalRuleBasedTasksStatusValue.CreateExpenseApprovalRuleBasedTasksStatusValue("Completed")
    getApprovalItem.StatusValue = "Completed"
    getApprovalItem.Complete = True
    spContext.UpdateObject(getApprovalItem)
    spContext.SaveChanges()
    End If

  • How to filter list items by current system time in search result wp or result source SharePoint 2013

    I want to display Items with PressDate less than or equal
    to current time in my search result webpart in SharePoint 2013.
    It is working fine for current date but not considering current time.
    {searchTerms} ContentType="ABC" PressDateTime<{Today+1}
    Above query not supporting for Now(), due to that it
    is showing items which are less than or equal to current (today's) date.
    How can I compare time with current system Time?..Thanks in advance.
    Regards, --NP

    You can achieve the same by using a Current Date Offset in a CAML Query to Filter List Items.
    Have below links for your reference.
    Sharepoint Tips And Tricks
    CAML Query to Date prior to 30 days from today
    Thanks.

  • How to store list item in hidden field?

    I want to store the list item value of SharePoint 2013 in a input type hidden field.
    And then want to get that items client side.
    How can I store that value to <Input type="Hidden"/>  field?
    Thanks in Advance.

    Hi,
    If you want to get the value of list item from client side, a recommended way is using
    JavaScript Client Object Model.
    With JavaScript Client Object Model, we can write code with JavaScript to access SharePoint objects from client side dynamically.
    The links below about JavaScript Client Object Model for your reference:
    http://msdn.microsoft.com/en-us/library/office/hh185006(v=office.14).aspx
    More information about JavaScript Client Object Model:
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to show list items in html page design?

    Hi all,
    I have a SharePoint list with column Title, Logo, Project Summary, Project Description and would like to show list items in html table design like:
    How to achieve this? thanks in advance!

    As per my understanding, You want to just redesign your list form. You can achieve the same using SPD2010 or you can use jQuery also if you don't have rights for SPD customization.
    Create
    a custom list form using SharePoint Designer
    SharePoint
    form: present fields side-by-side
    Thanks.

Maybe you are looking for

  • Down Payment Requist Issue

    HI, 1. While doing the down payment requist in F-47 against purchase Order, system is expecting the PO and Item number. Here we want to do DPR Purchage order wise only instead of po item number. Here user want to Enter PO Only. 2. Is it possible to m

  • Can you reorder items in the reading list?

    Simple question Can you reorder items that are saved in your Safari Reading list?  For example, move some items to the top or rearrange them so the ones on the same topic or from the same website are next to each other?  I would think this would be s

  • Ibooks syncing issue ipad 2

    Every time I link my Macbook Pro to my ipad 2 to sync I have to re check the 'load all books' box.  Is this a new books not syncing issue? Or something else? How do I keep the load all box checked so I can not keep assessing my memory wrongly?

  • What is the best way to migrate zoning from an MDS9216i to a Nexus 5596?

    I am migrating from a MDS9216i to a Nexus 5596.  We have dual paths, so I can migrate one leg at a time and the full function for these switches is fiber channel attached storage. What is the best way to migrate the zoning information? I have been to

  • I can not charge iphone by using power oulet

    i have an iphone 4. itis charging from usb but it doesn't charge from power outlet. what is the reason. thanks