Conditional code issue

I am creating a university database and am creating data for staff members.
(id, first, last, email, phone, is_student, student_id)

is_student will have outputs either ‘yes’ or ‘no’.

When is_student == no i want the output NULL, when the output of is_student is Yes, I want it to continue to produce a student number (in this case the datatype is a phone number ### ### ####)

I am new to coding but have done some research and still cant get it to work:

if field(‘is_student’) == ‘No’ then
this == Nil
elsif end

This is probably really easy but any help is appreciated, Thanks.

You can try doing it this way:

Then add your formula on the student_number:

if is_student == true then this
else end

Here is a sample schema:
https://mockaroo.com/e4e0d330