Skip to main content
added one more example
Source Link

This is one of the few reaction rule combinations I could get to work cleanly with the VBO and referencing the component above. It does not delete.

{ "rules_another_rules_test" : { "LABEL" : "Another rules test", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "rules", "views_bulk_operations", "entityform" ], "ON" : { "entityform_insert" : [] }, "IF" : [ { "data_is" : { "data" : [ "entityform:type" ], "value" : "myplatform" } } ], "DO" : [ { "views_bulk_operations_action_load_list" : { "USING" : { "view" : "backend_current_project_edit|default" }, "PROVIDE" : { "entity_list" : { "entity_list" : "A list of entities" } } } }, { "LOOP" : { "USING" : { "list" : [ "entity-list" ] }, "ITEM" : { "list_item" : "Current list item" }, "DO" : [ { "component_rules_delete_current_project" : { "current_project" : [ "entity-list" ] } } ] } } ] } }

The view which works on its own is structured:

The view which works on its own is structured:

This is one of the few reaction rule combinations I could get to work cleanly with the VBO and referencing the component above. It does not delete.

{ "rules_another_rules_test" : { "LABEL" : "Another rules test", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "rules", "views_bulk_operations", "entityform" ], "ON" : { "entityform_insert" : [] }, "IF" : [ { "data_is" : { "data" : [ "entityform:type" ], "value" : "myplatform" } } ], "DO" : [ { "views_bulk_operations_action_load_list" : { "USING" : { "view" : "backend_current_project_edit|default" }, "PROVIDE" : { "entity_list" : { "entity_list" : "A list of entities" } } } }, { "LOOP" : { "USING" : { "list" : [ "entity-list" ] }, "ITEM" : { "list_item" : "Current list item" }, "DO" : [ { "component_rules_delete_current_project" : { "current_project" : [ "entity-list" ] } } ] } } ] } }

The view which works on its own is structured:

deleted 1 character in body
Source Link

{ "rules_delete_existing_current_project" : { "LABEL" : "Delete Existing Current Project", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "rules", "entityform" ], "ON" : { "entityform_insert" : [] }, "IF" : [ { "data_is" : { "data" : [ "entityform:type" ], "value" : "myplatform_current_project" } }, { "AND" : [ { "entity_is_of_type" : { "entity" : [ "entityform" ], "type" : "entityform" } } ] }, { "AND" : [ { "data_is" : { "data" : [ "entityform:uid" ], "value" : [ "site:current-user:uid" ] } } ] } ], "DO" : [ { "entity_query" : { "USING" : { "type" : "entityform", "property" : "type", "value" : [ "entityform:type" ] }, "PROVIDE" : { "entity_fetched" : { "entity_fetched" : "Fetched entity" } } } }, { "LOOP" : { "USING" : { "list" : [ "entity-fetched" ] }, "ITEM" : { "list_item_parameters" : "Current list item" }, "DO" : [ { "variable_add" : { "USING" : { "type" : "entityform_type", "value" : "storybilder_current_project""myplatform_current_project" }, "PROVIDE" : { "variable_added" : { "variable_added_type" : "Added variable" } } } }, { "variable_add" : { "USING" : { "type" : "entityform", "value" : [ "entity-fetched:0" ] }, "PROVIDE" : { "variable_added" : { "variable_added_submission" : "Added variable" } } } }, { "variable_add" : { "USING" : { "type" : "user", "value" : [ "entity-fetched:0:user" ] }, "PROVIDE" : { "variable_added" : { "variable_added_user" : "Added variable" } } } } ] } }, { "LOOP" : { "USING" : { "list" : [ "entity-fetched" ] }, "ITEM" : { "list_item" : "Current list item" }, "DO" : [ { "component_rules_vbo_current_project_select" : { "current_project_list" : [ "entity-fetched" ], "user" : [ "list-item:user" ] } }, { "entity_delete" : { "data" : [ "entity-fetched:0" ] } } ] } } ] } }

{ "rules_delete_existing_current_project" : { "LABEL" : "Delete Existing Current Project", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "rules", "entityform" ], "ON" : { "entityform_insert" : [] }, "IF" : [ { "data_is" : { "data" : [ "entityform:type" ], "value" : "myplatform_current_project" } }, { "AND" : [ { "entity_is_of_type" : { "entity" : [ "entityform" ], "type" : "entityform" } } ] }, { "AND" : [ { "data_is" : { "data" : [ "entityform:uid" ], "value" : [ "site:current-user:uid" ] } } ] } ], "DO" : [ { "entity_query" : { "USING" : { "type" : "entityform", "property" : "type", "value" : [ "entityform:type" ] }, "PROVIDE" : { "entity_fetched" : { "entity_fetched" : "Fetched entity" } } } }, { "LOOP" : { "USING" : { "list" : [ "entity-fetched" ] }, "ITEM" : { "list_item_parameters" : "Current list item" }, "DO" : [ { "variable_add" : { "USING" : { "type" : "entityform_type", "value" : "storybilder_current_project" }, "PROVIDE" : { "variable_added" : { "variable_added_type" : "Added variable" } } } }, { "variable_add" : { "USING" : { "type" : "entityform", "value" : [ "entity-fetched:0" ] }, "PROVIDE" : { "variable_added" : { "variable_added_submission" : "Added variable" } } } }, { "variable_add" : { "USING" : { "type" : "user", "value" : [ "entity-fetched:0:user" ] }, "PROVIDE" : { "variable_added" : { "variable_added_user" : "Added variable" } } } } ] } }, { "LOOP" : { "USING" : { "list" : [ "entity-fetched" ] }, "ITEM" : { "list_item" : "Current list item" }, "DO" : [ { "component_rules_vbo_current_project_select" : { "current_project_list" : [ "entity-fetched" ], "user" : [ "list-item:user" ] } }, { "entity_delete" : { "data" : [ "entity-fetched:0" ] } } ] } } ] } }

{ "rules_delete_existing_current_project" : { "LABEL" : "Delete Existing Current Project", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "rules", "entityform" ], "ON" : { "entityform_insert" : [] }, "IF" : [ { "data_is" : { "data" : [ "entityform:type" ], "value" : "myplatform_current_project" } }, { "AND" : [ { "entity_is_of_type" : { "entity" : [ "entityform" ], "type" : "entityform" } } ] }, { "AND" : [ { "data_is" : { "data" : [ "entityform:uid" ], "value" : [ "site:current-user:uid" ] } } ] } ], "DO" : [ { "entity_query" : { "USING" : { "type" : "entityform", "property" : "type", "value" : [ "entityform:type" ] }, "PROVIDE" : { "entity_fetched" : { "entity_fetched" : "Fetched entity" } } } }, { "LOOP" : { "USING" : { "list" : [ "entity-fetched" ] }, "ITEM" : { "list_item_parameters" : "Current list item" }, "DO" : [ { "variable_add" : { "USING" : { "type" : "entityform_type", "value" : "myplatform_current_project" }, "PROVIDE" : { "variable_added" : { "variable_added_type" : "Added variable" } } } }, { "variable_add" : { "USING" : { "type" : "entityform", "value" : [ "entity-fetched:0" ] }, "PROVIDE" : { "variable_added" : { "variable_added_submission" : "Added variable" } } } }, { "variable_add" : { "USING" : { "type" : "user", "value" : [ "entity-fetched:0:user" ] }, "PROVIDE" : { "variable_added" : { "variable_added_user" : "Added variable" } } } } ] } }, { "LOOP" : { "USING" : { "list" : [ "entity-fetched" ] }, "ITEM" : { "list_item" : "Current list item" }, "DO" : [ { "component_rules_vbo_current_project_select" : { "current_project_list" : [ "entity-fetched" ], "user" : [ "list-item:user" ] } }, { "entity_delete" : { "data" : [ "entity-fetched:0" ] } } ] } } ] } }

tidied up code layout
Source Link

The view which works on its own is structuredThe view which works on its own is structured:

Format:
Unformatted list | Settings
Show:Fields | Settings

Format:Unformatted list | Settings Show:Fields | Settings Fields: Entityform Submission: Entityform submission ID Entityform Submission: Current Project Entityform Submission: Select Project Bulk operations: Entityform Submission 

Fields:
Entityform Submission: Entityform submission ID
Entityform Submission: Current Project
Entityform Submission: Select Project
Bulk operations: Entityform Submission

Filter criteria: 
Entityform Submission: Entityform Type (= MyPlatform Current Project) 
Entityform Submission: Uid (reference filter)

I have Bulk Operations set to:I have Bulk Operations set to:

Y Delete Current Project 
Y Skip confirmation step 
Y Skip permission step 
Y Override label

The view which works on its own is structured:

Format:Unformatted list | Settings Show:Fields | Settings Fields: Entityform Submission: Entityform submission ID Entityform Submission: Current Project Entityform Submission: Select Project Bulk operations: Entityform Submission 

Filter criteria: Entityform Submission: Entityform Type (= MyPlatform Current Project) Entityform Submission: Uid (reference filter)

I have Bulk Operations set to:

Y Delete Current Project Y Skip confirmation step Y Skip permission step Y Override label

The view which works on its own is structured:

Format:
Unformatted list | Settings
Show:Fields | Settings

Fields:
Entityform Submission: Entityform submission ID
Entityform Submission: Current Project
Entityform Submission: Select Project
Bulk operations: Entityform Submission

Filter criteria: 
Entityform Submission: Entityform Type (= MyPlatform Current Project) 
Entityform Submission: Uid (reference filter)

I have Bulk Operations set to:

Y Delete Current Project 
Y Skip confirmation step 
Y Skip permission step 
Y Override label

tidied up code layout
Source Link
Loading
Updated to add code, per @pierre_vriens request.
Source Link
Loading
Source Link
Loading