locked
Insert Data in table Using Azure Mobile Service RRS feed

  • Question

  • User1313904611 posted

    Hi,

    I Have a Mobile Service with 2 data (tables) - ItemStatus , ItemDetails

    itemstatus table has some data with itemName , status columns

     i want to insert  data in itemDetail table if particular item's status  in itemStatus Table set True...?

     here is my script but not working....

    function insert(item, user, request)

    {

    var itemstatus = tables.getTable('itemstatus ');

      itemstatus

       .where({ text: item.ItemName})

       .read({ success: function(itemstatus)

       {

          itemstatus.forEach(function(itemstatus)

          {  

            if(itemstatus.status='true')

             {

                request.execute();

             }

    else { }

    }); } });

    please someone help me

     

    Tuesday, July 22, 2014 9:52 AM

Answers