straight-wolf-37371
07/20/2023, 6:50 PMhttps://cdn.discordapp.com/attachments/1131659426806374410/1131659427099979806/image.png▾
https://cdn.discordapp.com/attachments/1131659426806374410/1131659427385200771/image.png▾
crooked-van-25152
07/20/2023, 7:02 PMstraight-wolf-37371
07/20/2023, 7:03 PMwitty-football-93730
07/21/2023, 3:18 PMstraight-wolf-37371
07/21/2023, 3:23 PMwitty-football-93730
07/21/2023, 3:24 PMwitty-football-93730
07/21/2023, 3:24 PMwitty-football-93730
07/21/2023, 3:25 PMconst items = ['Pro Panel', 'Classic Rib'].map((item) => ({
Item: item,
"Store Description": 'This is a fake item'
}))
await ExampleData.createRecords(items)
straight-wolf-37371
07/21/2023, 4:07 PMconst fetchRecords = async () => {
try {
const recordData = await Character_DataTable.findRecords({})
workflow.recordsFound = []
// Get All Ability Records
for (const ability of workflow.abilitiesInQuestion) {
for (const record of recordData) {
console.log('Checking match between: ' + record.Ability_Name + ' and ' + ability)
if (record.Ability_Name === ability) {
console.log('Found Matching Record: ' + record.Ability_Name)
workflow.recordsFound.push(record)
}
}
}
// Get All Character Abilities
for (const character of workflow.charactersInQuestion) {
for (const record of recordData) {
console.log('Checking match between: ' + record.Ability_Owner + ' and ' + character)
if (record.Ability_Owner === character) {
console.log('Found Matching Record: ' + record.Ability_Owner)
workflow.recordsFound.push(record)
}
}
}
} catch (error) {
console.error('Error fetching records:', error)
}
}
await fetchRecords()
console.log("I found " + workflow.recordsFound.length + " records")
workflow.recordsFound = _.uniqBy(workflow.recordsFound, 'id')
witty-football-93730
07/21/2023, 5:18 PMstraight-wolf-37371
07/21/2023, 5:33 PM