PostgreSQL · Types · Entities and values
ArxSelectionSetValue
Definition
- Namespace
ARX.SDK.Services- Package
ARX.SDK
public sealed class ArxSelectionSetValueA selection set (option set, picklist) value: the option's code, checked against the set named SetName in the developer's IArxSelectionSetCatalog and written in that set's storage form. A plain int or string attribute is written as is, without catalog checks.
Constructor
ArxSelectionSetValue(string setName, object value)A single-choice value:
valueis the option's code (an integer, string, char, bool, decimal or Guid).Parameter Type Description setNamestringThe catalog set to check against. Required when writing; a missing name is reported as ARX1006 by the provider. valueobjectThe option's code. Not null, and not a collection (use Multiple).
Also created with:
ArxSelectionSetValue.Multiple(string setName, params object[] values)A multiple-choice value. An empty list means no option is chosen.
Parameter Type Description setNamestringThe selection set's name in the catalog. valuesparams object[]The chosen codes. ArxSelectionSetValue.Multiple(string setName, IEnumerable values)A multiple-choice value from any sequence of codes (
int[],List<string>, …). An empty sequence means no option is chosen. A singlestringis one code, not a sequence of characters.Parameter Type Description setNamestringThe selection set's name in the catalog. valuesIEnumerableThe chosen codes.
Properties
string SetName { get; }The catalog set this value belongs to.
object? Value { get; }The single-choice code; null for a multiple-choice value.
IReadOnlyList<object> Values { get; }Every chosen code: one for a single-choice value, zero or more for a multiple-choice value.
bool IsMultiple { get; }True when created with
Multipleor decoded from a multiple-choice set.IReadOnlyList<ArxSelectionSetOption?>? Options { get; }The catalog options matching
Values, in the same order, when the value was decoded from storage; an entry is null when the stored code isn't in the set. Null for values created by the caller.bool IsDefined { get; }True when the value was decoded and every stored code is an option of the set.
string? DisplayText { get; }The display text of the matched option (single choice), or of every matched option joined with ", " in stored order (multiple choice). Null when not decoded, or when a single-choice code isn't in the set.
Usage
A line from a verified sample; the full, runnable code is on its page.
account["industry"] = new ArxSelectionSetValue("Industry", Industry.Retail);A sign-up form creates an account, scenario 1
Used in:
- A sign-up form creates an accountCreate
- Every supported .NET type, and what PostgreSQL storesCreate
- Picklist values checked against the application's catalogCreate
- Register ARX in a DI container and inject itCreate
- Several calls in one ARX transaction: commit or roll backCreate
- Save an account's contacts in one callCreateMultiple
- Put accounts on hold (selection set, by key)UpdateMultiple
- Soft delete: close and restore an accountDelete
- Every data type, written and read backRetrieve
- A contact search screenRetrieveMultiple
- Accounts and contacts in one queryRetrieveMultiple
- A report: accounts by industryRetrieveMultiple
- Filter expressions in depth: nesting, recursion, links, And and OrRetrieveMultiple
- Read functions in depth: table rows, OUT values, one value, records, writes, proceduresRetrieveMultiple
- Business errors raised by a procedureExecute
Notes
Create a single-choice value with the constructor and a multiple-choice value with Multiple. Values read back through ArxSelectionSetExtensions.GetSelectionSet also carry the matched Options, so DisplayText and IsDefined are available.