Forum Academy Marketplace Showcase Pricing Features

Delete Room from User

Hi
I’m adding a room to a student by the state , - the room is a list so every student can be on more than one room -
but I dont know to delete this room from the user , this is how I set up things

This how I add students to a room datatype

Add to room

student to room

and this how I delete student from - Room datatype- , but I dont know how I can delete the - Room field - from Students datatype

reomve from the room

remove room field

NOTE : THE STATE CALLED : Students

What comes after room remove should be of type Room - looks like it is currently of type student

I want to remove the room that’s shown on the popup from the User datatype , but I don’t have an option called ’ Parent group room ’

On your last screenshot it looks like you are trying to set a condition. If you add doesn't contain the result is yes/no and there is no way that you can go back to room type in that expression.
When you do room remove select the room that you want to remove. Add the condition on only when.

I have the codition set up , I want to remove the parent group room but it’s dose not show

only when

st

that’s probably because the workflow is initiated by an element inside a group of type student

so what should now

There are multiple ways: either trigger the workflow from an element inside a group with the data type you need, or change the data type of the parent group, or reference another group with the data type you need or store the data you need in a custom state and reference that.

I tried everything except custom state , anyway look here when I want to add student into a room it’s showing - parent group room -
and it’s the same datatype , it’s even the same icon I click
roo

Of course you are the only one that knows what’s happening in the editor.
From what you shared I can see that the second workflow triggers from a parent element that is not of the type you want.
Only you know from where you are getting the room to delete. If it originates from this workflow then you need to reference the group that holds this information. If it originates from previous actions (like selecting a room in a nested repeating group) then you should set this information in a group/custom state that is accessible from the element that is triggering the workflow.

can you explain to me what do you mean saving it on custom state , I know how to use custom state
but give me example of saving in it on custom state

I mean using the action set state of an element.

I tried it didn’t work :disappointed: :disappointed: :disappointed: :disappointed: :sweat:

without details on what you tried, what is the structure of yojr data and the structure of the elements in you page it’s difficult to help you here.

Perhaps you should try first an easier example on a new page. Just a button that adds a room and one that removes it. It’s easier this way and you understand where to find the data source that you need.