Announcement

As of April 17, 2018, this site is now in read-only mode. To start new Blackbaud Developer’s discussions, you will find Developer Discussions in the Blackbaud CRM Community.

To post or respond to Blackbaud Community discussions, you will have to login using a www.blackbaud.com login. Learn how to login here. If you have questions or need assistance, please email community@blackbaud.com.

1.7k questions

3.2k answers

401 users

Categories

1.7k questions

3.2k answers

401 users

I have a collection defined as
_emails2 = New Global.Blackbaud.AppFx.UIModeling.Core.CollectionField(Of BioUpdateRequestEditDataForm2EMAILS2UIModel)

The viewmode is repeater. The collection has one occurence when the form is first displayed.
By default, I have the collection defined as hidden. When the user hits the action button for the first time, I want it to make the collection visible but not add another instance to the collection. Is there a property that has the number of items in the collection that I can use to do something like the following:

Private Sub _emailsadd_InvokeAction(sender As Object, e As Blackbaud.AppFx.UIModeling.Core.InvokeActionEventArgs) Handles _emailsadd.InvokeAction

    If _emails2.ItemCount = 1 Then
        _emails2.Visible = True  ' just make first item in collection visible
    Else
        _emails2.Value.AddNew()  ' add addtional item to collection
    End If

End Sub

asked by richgraham (182 points)

1 Answer

You should be able to use

_emails2.Value.Count
answered by danielcooke (3.5k points)
...