Race Dat Codes

toniquack
Journeyman

Race Dat Codes

How do I find the Race dat codes (radio buttons)?  Or how can I pull the Race data?

8 Replies
ParitoshT
Community Support Expert
Community Support Expert

 Hi @toniquack,

 

Currently, the DAT code to pull students with their Race code is not built into the system. You may need to search for the student race code on the start page and then export the students with a specific Race code using the Quick Export under the function menu. You can also export the StudentRace(201) table using Direct Database Export.

 

Please let me know if this helps.

 

ParitoshT
Community Moderator

 

Remember to give Kudos to suggestions that help you!
If another user helps solve your issue, please select Accept As Solution on their post so others can see the solution, too!

KyleB
Hobbyist

I am in awe that this isn't something that was developed the moment they introduced the Federal Race table.

 

But with that said, I just stumbled on this myself, and a vendor that we're working with came up with this amazing code:

 

~(decode;~(f.table_info;table=StudentRace;fn=value;field=RaceCD;dothisfor= all;*studentid=~([01]id);*RaceCD=I);I;Y; )
~(decode;~(f.table_info;table=StudentRace;fn=value;field=RaceCD;dothisfor= all;*studentid=~([01]id);*RaceCD=A);A;Y; )
~(decode;~(f.table_info;table=StudentRace;fn=value;field=RaceCD;dothisfor= all;*studentid=~([01]id);*RaceCD=B);B;Y; )
~(decode;~(f.table_info;table=StudentRace;fn=value;field=RaceCD;dothisfor= all;*studentid=~([01]id);*RaceCD=P);P;Y; )
~(decode;~(f.table_info;table=StudentRace;fn=value;field=RaceCD;dothisfor= all;*studentid=~([01]id);*RaceCD=W);W;Y; )

 

 

 

This is tailored to New Jersey's race codes, but you should get the gist - replace the single letter codes with whatever your state uses.

 

Tested and worked with Quick Export - I haven't tried it anywhere else.

KyleB
Hobbyist

One additional note - if you are looking for a Hispanic code, that's not considered a Race and can be found in the Student field FedEthnicity which will pull a 0 or 1 depending on what was selected on the Demographics page.

toniquack
Journeyman

This worked great - Thank you!  I don't suppose you know how to get the ParentPortal Email data code - do you?  I can pull the Guardian Email, but can't find the code for the Parent Portal Email.

KyleB
Hobbyist

(sorry for the off-topic q&a folks!)

 

lol, well @toniquack I've only done that with SQL - you might be able to combine it with a tlist on a custom screen, but I haven't used those in a while (I got lazy and just use an external PHP server and Ajax to pull data these days!)

 

I should also mention we have not migrated to the new Contacts interface (I know, I know...) but I'm not sure if you have if that'll throw a wrinkle into any of this.

 

There are two email addresses in the parent portal - the primary email address, and then a second spot for additional notification email addresses.

 

To get the primary email address for the parent's account, use this:

		SELECT
			s.STUDENT_NUMBER,
			s.FIRST_NAME,
			s.LAST_NAME,
			g.GuardianStudentID,
			ec.EmailAddress
		FROM
		 	Students s,
			GuardianStudent g,
			PCAS_EmailContact ec
		WHERE
			s.DCID = g.StudentsDCID AND
			g.GuardianID = ec.ExternalIdent AND
			s.Enroll_Status=0

 

And then if you want the additional notification emails, use this - assuming you can plug in the GuardianStudentID acquired in the previous query.

SELECT
	NotificationEmail
FROM
	GuardianNotificationEmail
WHERE
	GuardianStudentID=[GuardianStudentID from previous query]

 

 

JenniferR2
Journeyman

Kyle - I am trying to get this to work - I have replaced the *RaceCD=B with the code # we use for that race - and I am getting nothing with quick export.

 

Any ideas?  I am trying to find out what races my Hispanic kids identify with.

toniquack
Journeyman

Jennifer -- it took me some time, but I do have some codes I put together that does pull the data I needed.  If you Email me at toni.quackenbush@ksd.org, I'm happy to share them with you.

BarbM8
PowerSchool Champion
PowerSchool Champion

Wow!  Thanks for this code to export the race.  It worked like a charm!