AI-Agent-First Documentation
Prompt your Agent: "Query and mutate records on the 'function' table (ID prefix 'fun_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."
Function (function)
Reusable code with functions and/or classes for your use.
Python SDK & PlatformContext Example
# 1. Query function via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM function ORDER BY created_date DESC LIMIT 25")
# 2. Create function record (Generates 'fun_...' Base62 ID)
created = await platform.records.create("function", [
{"name": "Example Function"}
])| Field API Name | Type / Format | Lookup Target | Flags | Description |
|---|---|---|---|---|
| id | string | — | required | Id |
| name | string | — | required | Name |
| created_date | stringdate-time | — | Created Date | |
| modified_date | stringdate-time | — | Modified Date | |
| created_by | stringlookup | → user (string ID) | Created By | |
| modified_by | stringlookup | → user (string ID) | Modified By | |
| file_name | string | — | The name of the file | |
| code | stringcode | — | The actual code in this function | |
| app | stringlookup | → app (string ID) | The app this function is related to | |
| shared_with | listsharing | — | system | Shared With |
