User Tools

Site Tools


macros:example:deletegroup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

macros:example:deletegroup [2018/12/23 16:54] (current)
icke_siegen created
Line 1: Line 1:
 +Example
  
 +====== Delete Group X ======
 +
 +^ by: | Sebastian Beutel |
 +^ published: | November 2018 |
 +^ description:​ | deletes a designated group|
 +
 +{{tag>​delete group handle}}
 +
 +==== functions ====
 +  * [[:​macros:​function:​Handles.SetSourceHandleFromHandle]]
 +  * [[:​macros:​function:​Handles.ConfirmDelete]]
 + 
 +===== Code =====
 +
 +<code xml DeleteGroup20.xml>​
 +<?xml version="​1.0"​ encoding="​utf-8"?>​
 +<​avolites.macros>​
 +  <macro id="​SB.DeleteGroupUn20"​ name="​Delete Group 20">​
 +    <​sequence>​
 +      <​step>​Handles.SetSourceHandleFromHandle("​groupHandleUN=20"​)</​step>​
 +      <​step>​Handles.ConfirmDelete()</​step>​
 +    </​sequence>​
 +  </​macro>​
 +</​avolites.macros>​
 +</​code>​
 +
 +
 +===== Explanation =====
 +
 +This explains the functional steps within the sequence. For all the other XML details please refer to [[:​macros:​formats_and_syntax#​xml_format|Formats and syntax]]
 +  * ''​Handles.SetSourceHandleFromHandle("​groupHandleUN=20"​)''​ marks the group with usernumber 20 as sourceHandle for the next operation
 +  * ''​Handles.ConfirmDelete()''​ deletes the previously selected handle (the group UN20)
 +
 +===== How to use it =====
 +
 +  * [[:​macros:​deploying|make this macro available]]
 +  * while it may be not that interesting to delete a group by individual macro, this is an example how items can be deleted in general - and maybe this is useful in another context
 +
 +~~DISCUSSION~~
macros/example/deletegroup.txt ยท Last modified: 2018/12/23 16:54 by icke_siegen