If you select "Portfolio" (the default) you can select any program and project in the table.
If you select "Program" a dropdown list appears and you are required to select a program. All lines that you add to the table will be locked at that program and you will only be able to select projects within it.
If you select "Project" a dropdown list appears and you are required to select a project. All lines that you add to the table will be locked at that project.