How to do check the slot condition is set and select the right action

Hi, I’m new here for RASA. I have question on how to write a single story instead of 2 where if a slot is set then will choose action A; else choose action B. For instance I have the intent, response, and story below:

nlu.yml

intent: ask_project_group
  examples: |
    - What are the Unix groups needed for [ProjectX](project_code)?
    - If I work on [ProjectY](project_code), what are the groups I need?
    - What groups I need?
    - I work for [ProjectZ](project_code), what groups I will need?
    - Any groups I need to include?
    - What groups I should wash?

intent: give_project_code
  examples: | 
    - [ProjectX](project_code)
    - I work on [ProjectA](project_code)
    - [ProjectC](project_code)
    - Here, [projectN](project_code)
    - Ok, [ProjectE](project_code)

Note that some examples in “ask_project_group” do not provide the “project_code”

domain.yml

utter_ask_project:
  - text: What project you are working on?
  - text: Could you provide the project code?

story.yml

story: Ask project groups - project_code provided
  - intent: ask_project_code
  - slot_was_set:
    - project_code
  - action: get_project_code   

story: Ask project groups - no project_code provided
  - intent: ask_project_code
  - slot_was_not_set:
    - project_code
  - action: utter_ask_project
  - intent: give_project_code
  - action: get_project_code   

Note that the get_project_code is custom action that will query details from some database and return value to user.

How can I combine it into single story where if the “project_code” is found then go for action “get_project_code”; else, add an action of “utter_ask_project” then proceed to “get_project_code”? Thanks.

hello,why you can use slot_was_not_set?there my rasa is wrong