The obvious omission here is that when the initial expression evaluates to FALSE, you would catch that by way of the ELSE leg of the initial IF statement. There is no need for two IF statements there.
Kaz, it seems that you need to go to a senior person in your organization for this type of help. For sure you need some education, and I would suggest that you follow the two development courses for NAV. You could probably also use an even more rudimentary programming course, to learn about code constructs, and generally applicable programming structures. I don’t know how you would get that type of training where you live, but over here I would go to a local community college.
Talk to your boss about getting the proper support within your company and the right training for you specifically.