Why domain file is not accepting a slot mapping condition "active loop : null"?

I want to assign an entity slot mapping when no loop is active. I am certain that this is how to achieve this.

<!======>>> domain.yml

altphone:
    type: text
    influence_conversation: false
    mappings:
      - type: from_entity
        intent: inform_correct_credentials
        entity: altphone
        conditions:
          - active_loop: null

but this gives me an error.

====== error======

required.novalue : '/slots/altphone/mappings/0/conditions/0/active_loop'.

Question is

> Can we use active loop null in slot mappings?

Hey @MuhammadBilal1150, you don’t have to set the condition for active_loop to null when there are no active loops.

Instead, if you need to include any form to the active_loop, you can do it like this:

conditions:
      - active_loop: your_form
        requested_slot: slot_name

In my scenario, I have 2 slots. phone and altphone(alternate phone). phone is being set in a loop by an intent that also sets altphone because there patterns are same. I want to prevent altphone to be set in that loop.

Can you show your implementation of this?

1 Like

I no longer need that now. I figured an alternate to this. I’m setting null the slots that I want to prevent filling in a form.

Could you please elaborate a little more? What if you still need the values in those slots(which shouldnt be affected by the form)?

I had an intent to set phone slot in a loop and same intent for setting alternate phone slot in a story. I wanted alternate phone to be set in the story only not in the loop. I thought this could be done by defining a slot condition active loop null to the altphone slot mapping. but It gave an error.