How to Get Specific Row from Data Table.

vikram_s

Hi William Thompson,

I am calling data table API to get the specific record from the data table.


I want to get 40091 row. Please let me know how we can pass this code in where condition under the below API to fetch the specific row:

https://admin.threekit.com/api/datatables/{datatableId}/row?orgId=[orgId]&where=[where]

Comments

5 comments

  • Comment author
    vikram_s

    Hello I am waiting for your response.

    0
  • Comment author
    Michael Woelfel
    • Edited

    Hi vikram_s, Will does not moderate the community forum any longer. Additionally, our team are in the process of writing proper documentation for this but here is an example of the format:

    const rowQuery = {
      threadCode: {
        column: 'threadCode',
        comparator: '=',
        value: threadValue,
      },
    };
    
    const url = `https://preview.threekit.com/api/datatables/${tableId}/row?where=${encodeURIComponent(
      JSON.stringify(rowQuery)
    )}`;
    0
  • Comment author
    vikram_s
    • Edited

    Michael Woelfel

    const rowQuery = {
    storeCode: {
    column: 'Store Code',
    comparator: '=',
    value: 40091,
    },
    };

    Is it correct as per shared above screenshot?

    0
  • Comment author
    Michael Woelfel

    vikram_s Yes that appears correct. If you are experiencing any issues you may need to adjust the format so these values are equal:

    storeCode: {
    column: 'Store Code',

     

     

    0
  • Comment author
    vikram_s

    Hello Michael Woelfel,

    This syntax is working fine for me :

    const rowQuery = {
        ['Column Name']: {
            column: 'Column Name',
            comparator: '=',
            value: Column Value,
        },
    };
    0

Please sign in to leave a comment.