KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Fundamental Capstoen Ex 1.2

  • Fundamental Capstoen Ex 1.2

    Posted by pravigak on October 25, 2023 at 12:00 am

    When I call my showTableSummary[] function is gives me a mismatched type error.

    It was working before not sure how to fix it. This is my code for it:

    {
    tableNames: tables[];
    tableSummary: ()!();
    // Initialize an empty dictionary

    {tableSummary[x]: count get x} each tableNames;
    // get retrieves data from the table
    // use tableSummary[x]: to assign value to key x

    tableSummary
    // Return the dictionary
    }

    pravigak replied 9 months, 3 weeks ago 2 Members · 1 Reply
  • 1 Reply
  • megan_mcp

    Administrator
    October 26, 2023 at 12:00 am

    Hi ,

    Here are some hints to help simplify your function:

    count each `. tables[] – returns the number of rows in each table

    list1 ! list2 – joins these two lists together to create a dictionary

    If you are still stuck let me know,

    Megan

Log in to reply.