This function changes the branch version for the specified web feature layer. Branch versions may be displayed as locked in the Esri Contents user interface if the published service is set to read-only, or if the branch version was unable to be edited at the time it was added. If not designated specifically as a read-only layer the branch version layer can be toggled to the unlocked editing state in the context menu of the Esri Contents user interface, but will require a user with the appropriate credentials to be signed-in, in order to synchronize changes.
Syntax
(esri_webfeaturelayer_changeBranch flname branchName)
Arguments
The following arguments are included as follows:
- flname | string | required | An existing web feature layer name in the drawing.
- branchName | string | required | An existing branch name to be used for the current branch version.
Example usage
Attempts to change the branch version of the landowners layer to the editor01.phase1 branch version.(esri_webfeaturelayer_changeBranch "landowners" "editor01.phase1")
Result example usage
The current branch version of the landowners layer is changed to the editor01.phase1 branch version, and returns a list of true :
(T)
Return values
- If successful the function returns a list of true: (T).
- If failed, returns a list with the first value of nil and then an associated list containing the key value "Error" and an associated error message as a string: (nil ( "Error" . "<message>"))
Failed return values
A failed return value can occur for any of the following reasons:
- (nil ("Error" . "Missing required
argument."))
The required argument is not supplied.
- (nil ("Error" . "Branch version not found."))
The branch version name was not found.
- (nil ("Error" . "Layer does not support branch versions")
Layer does not support branch versions.
- (nil ("Error" . "No connected web feature layers found."))
No connected web feature layers found.