Hello,
I am trying to parse the data from the SC Database Query Action into my custom module. However, what gets passed into the variables is just the object "{query}" and nothing else, even though I can confirm the query has successfully retrieved data. See below:
hjson file:
{
type: 'player_streakStatus',
module : 'player',
action : 'streakStatus',
groupTitle: 'Players',
groupIcon: 'fas fa-lg fa-broom comp-flows',
title: 'Streak Calculator',
icon: 'fas fa-lg fa-fire comp-exec',
properties: [
{
group: 'Module Inputs',
variables: [
{
name: 'actionName',
optionName: 'name',
title: 'Name',
type: 'text',
required: true,
defaultValue: '',
baseName: "streakStatus"
},
{
name: 'logs',
optionName: 'logs',
title: 'Player Logs',
type: 'text',
required: true,
serverDataBindings: true
},
{
name: 'output',
optionName: 'output',
title: 'Output',
type: 'boolean',
defaultValue: false
}
]
}
]
}
js file:
exports.streakStatus = async function (options) {
const logs = options.logs;
return logs;
}
endpoint output:
{
"query": [
{
"id": "1",
"created_at": "2025-07-11T22:41:57.237Z",
"streaker_id": "1",
"logged_date": "2025-07-12"
},
{
"id": "2",
"created_at": "2025-07-11T22:42:09.542Z",
"streaker_id": "1",
"logged_date": "2025-07-11"
},
{
"id": "4",
"created_at": "2025-07-11T22:51:11.376Z",
"streaker_id": "1",
"logged_date": "2025-07-10"
},
{
"id": "11",
"created_at": "2025-07-12T13:38:31.031Z",
"streaker_id": "1",
"logged_date": "2025-07-09"
},
{
"id": "12",
"created_at": "2025-07-12T15:35:04.624Z",
"streaker_id": "1",
"logged_date": "2025-07-08"
},
{
"id": "13",
"created_at": "2025-07-12T16:11:32.589Z",
"streaker_id": "1",
"logged_date": "2025-07-07"
}
],
"streakStatus": "{{query}}"
}
