public ActivityUi(UiBuilder uiBuilder) { FeedTextSource = uiBuilder.CreateSpecificOrUpstreamValueChooser("Chatter Message", nameof(FeedTextSource), requestUpstream: true, availability: AvailabilityType.RunTime); ChatterSelector = new DropDownList { Name = nameof(ChatterSelector), Label = "Get which object?", Required = true, Events = new List <ControlEvent> { ControlEvent.RequestConfig } }; ChatterFilter = new QueryBuilder { Name = nameof(ChatterFilter), Label = "Meeting which conditions?", Required = true, Source = new FieldSourceDTO { Label = QueryFilterCrateLabel, ManifestType = CrateManifestTypes.StandardDesignTimeFields } }; QueryForChatterOption = new RadioButtonOption { Name = nameof(QueryForChatterOption), Value = "Query for chatter objects", Controls = new List <ControlDefinitionDTO> { ChatterSelector, ChatterFilter } }; IncomingChatterIdSelector = new UpstreamFieldChooser { Name = nameof(IncomingChatterIdSelector), Source = new FieldSourceDTO { AvailabilityType = AvailabilityType.RunTime, ManifestType = CrateManifestTypes.StandardDesignTimeFields } }; UseIncomingChatterIdOption = new RadioButtonOption { Name = nameof(UseIncomingChatterIdOption), Value = "Use this incoming value as chatter Id", Controls = new List <ControlDefinitionDTO> { IncomingChatterIdSelector } }; ChatterSelectionGroup = new RadioButtonGroup { Name = nameof(ChatterSelectionGroup), GroupName = nameof(ChatterSelectionGroup), Label = "Which chatter to post to?", Radios = new List <RadioButtonOption> { QueryForChatterOption, UseIncomingChatterIdOption } }; Controls.Add(FeedTextSource); Controls.Add(ChatterSelectionGroup); }
public ActivityUi(UiBuilder uiBuilder) { DataSourceSelector = new DropDownList { Name = nameof(DataSourceSelector), Label = "Build the CheckList of objects", Events = new List <ControlEvent> { ControlEvent.RequestConfig } }; IncomingTextSelector = new UpstreamFieldChooser { Name = nameof(IncomingTextSelector), Label = "Compare CheckList against which incoming text", Source = new FieldSourceDTO { AvailabilityType = AvailabilityType.RunTime, ManifestType = CrateManifestTypes.StandardDesignTimeFields, RequestUpstream = true }, }; KeywordPropertiesSource = new TextBox { Name = nameof(KeywordPropertiesSource), Label = "Build an UpdateList containing CheckList objects where one of the below properties matches a word in the Incoming text" }; KeywordPropertiesSourceDescription = new TextBlock { Name = nameof(KeywordPropertiesSourceDescription), Value = "Multiple values should be separated with commas" }; Controls.Add(DataSourceSelector); Controls.Add(IncomingTextSelector); Controls.Add(KeywordPropertiesSource); Controls.Add(KeywordPropertiesSourceDescription); }