TG station interfacing with circuit tables

General SS13 Chat
Post Reply
abdulshakur
Joined: Sat Nov 20, 2021 4:57 am
Byond Username: JohnSmith1234

TG station interfacing with circuit tables

Post by abdulshakur » #657908

Anyone know how to interface with tables in the integrated circuits, what I am trying to do in interface with the security records table and print out the name column of the table, I've tried using the select query component and the index table component but they both don't seem to be giving me what I'm after. The index table component gives two outputs when triggered, a string and a list, what does this mean? I tried separating them using the separator but no joy. If anyone has any ideas let me know please.
User avatar
Rohen_Tahir
Joined: Wed Jun 05, 2019 1:00 pm
Byond Username: Rohen Tahir
Location: Primary fool storage
Contact:

Re: TG station interfacing with circuit tables

Post by Rohen_Tahir » #657945

Have you tried summoning a demon to help you with this issue?
Image
User avatar
TheSmallBlue
Joined: Thu Oct 31, 2019 3:55 pm
Byond Username: SmallBlue

Re: TG station interfacing with circuit tables

Post by TheSmallBlue » #658081

You should be using the Get Column component instead, like so:
Image

And make sure the security console you're using is logged in, otherwise you won't get jack
When human I go by Bluti Kabooti, when AI I go by Azure
Image
Comm from
User avatar
TheSmallBlue
Joined: Thu Oct 31, 2019 3:55 pm
Byond Username: SmallBlue

Re: TG station interfacing with circuit tables

Post by TheSmallBlue » #658082

To answer your other questions, the reason why Index Table returns a string, any list output is because that's how associative lists are presented. You'd need a special component that can handle associative lists, like Index Associative List or Format Associative List.

When it comes to USB components, only reason you'd use Index Table is with Select Query to get all the information from one specific person. For example
Lest say we have someone named Joey Clark, and you want to get their species.
You first use the Select Query component to get a table only including Joey Clark's information by changing the Column Name value to "name" (you can see a list of available columns by clicking the i icon on the security records data component) and the Comparison Input to Joey Clark. Then you use the index table component to turn the table into a manageable associative list, which you then index via the value you want to get with the Index Associative List component, in this case "species".

Here's how it'd look:
Image

This isn't what you're looking for according to this post, but its useful to know anyways
When human I go by Bluti Kabooti, when AI I go by Azure
Image
Comm from
abdulshakur
Joined: Sat Nov 20, 2021 4:57 am
Byond Username: JohnSmith1234

Re: TG station interfacing with circuit tables

Post by abdulshakur » #658121

Ah thank you, I managed to figure out what you posted in your first reply but the associative list info is super helpful. Thanks homie!
Post Reply

Who is online

Users browsing this forum: PapaMichael