How to quickly create a Types from your SQL Queries

Creating a Type can be a tedious process if it is quite big and elaborate. Luckily Linx has the Import types feature, making it easy to create Types from a JSON or XML object.

To quickly create a type for the output of your SQL statement, you can follow these steps:

  1. Drag a new ExecuteSQL function into your function and configure it to connect to your Database
  2. List item Add your SQL query
  3. Add a string underneath the query execution
  4. Assign the output value of the ExecuteSQL function to the String
  5. Add a breakpoint to where the String is
  6. Debug the solution until after the String has been assigned
  7. Copy the value assigned to the String (this will be a JSON object)
  8. Stop debugging and delete the String
  9. Either: right-click on a folder OR go to the menu > Solution > Import Type
  10. Give your type a name and paste the copied JSON object into the text box
  11. Create your type and use it as required.

Twenty57.Linx.Designer.UI_t9N3NjAmQ4

1 Like