QuickList.SubList
-----------------

Returns a part of the list.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [7.5](newinversion75.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "QuickList.SubList"; ListRef; Index; Count { ; ReturnNewList; NoReturnEnding } ) 

**MBS**( **"QuickList.SubList";** /\* Returns a part of the list. \*/  
**$ListRef**; /\* The reference to the list returned from [QuickList.New](QuickListNew.md) function.e.g. $List \*/   
**$Index**; /\* The zero based index where to start.  
Or in other words: How many entries to skip.e.g. 3 \*/   
**$Count**; /\* How many entries to copy.  
If negative, we pick the other items left.e.g. 5 \*/   
**$ReturnNewList**; /\* Optional; Pass 1 to return result as new QuickList.   
This new list must be freed later using [QuickList.Release](QuickListRelease.md) function. Pass 0 (Default) to return a text list.e.g. 0 \*/   
**$NoReturnEnding**) /\* Optional; If you passed 0 for ReturnNewList, decides about new list:  
Pass 1 to have no extra newline character on the end of the returned list. Default is 0 to include one to easily concat lists.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ListRef | The reference to the list returned from [QuickList.New](QuickListNew.md) function. | $List |  |
| Index | The zero based index where to start.   Or in other words: How many entries to skip. | 3 |  |
| Count | How many entries to copy.   If negative, we pick the other items left. | 5 |  |
| ReturnNewList | Pass 1 to return result as new QuickList.    This new list must be freed later using [QuickList.Release](QuickListRelease.md) function. Pass 0 (Default) to return a text list. | 0 | Optional |
| NoReturnEnding | If you passed 0 for ReturnNewList, decides about new list:   Pass 1 to have no extra newline character on the end of the returned list. Default is 0 to include one to easily concat lists. | 1 | Optional |

### Result

Returns OK or error.

### Description

Returns a part of the list.  
Can return new QuickList or normal list.  
### See also

- [QuickList.AddList](QuickListAddList.md)
- [QuickList.GetList](QuickListGetList.md)
- [QuickList.List](QuickListList.md)
- [QuickList.New](QuickListNew.md)
- [QuickList.PopFirst](QuickListPopFirst.md)
- [QuickList.Release](QuickListRelease.md)
- [QuickList.SetList](QuickListSetList.md)

### Release notes

- **Version 7.5**
    - Added [List.SubList](http://www.mbsplugins.eu/ListSubList.shtml) and [QuickList.SubList](http://www.mbsplugins.eu/QuickListSubList.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 7.5pr1](https://www.mbsplugins.de/archive/2017-10-01/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th September 2017 , last changed 14th December 2023

  
[QuickList.SortWithEvaluate](QuickListSortWithEvaluate.md) - [QuickList.Trim](QuickListTrim.md)

[HTML Version](QuickListSubList.shtml)