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

Hello,

When I click on a Link from a Widget (SP) formatted with only a CustomUIModel, I would like to pass a list of parameters(e.g. start and end dates) to a QueryView/Listbuilder (or DataList) located on a different page. I would like to do this completely within the VB code side of things - which is what I believe the out of the box BlackBaud widget screens are based on. I am basically trying to replicate a CustomUIModel driven Widget like one of the out of the box screens.

---- The following section is in my CustomUIModel for the Widget interface ----

<CustomUIModelMetadata
[Header info stuff]

<FormFields>
  <FormField FieldID="OVERDUEASKSCOUNT" Caption="Total Qualified Opportunities (Planned)"  DataType="Integer" />

  **** WOULD LIKE TO PASS THESE DATES AS EXAMPLE  *****
  <FormField FieldID="STARTDATE" Caption="Start Date" DataType="Date" />
  <FormField FieldID="ENDDATE" Caption="End Date" DataType="Date" />      
</FormFields>

<WebUIComponent>
  <UIModel AssemblyName="AI.CustomFx.Constituent.UIModel.dll" ClassName="AI.CustomFx.Constituent.UIModel.OverdueUIModel" />
  <WebUI>
    <ExternalResource Url="browser/htmlforms/custom/ai.customfx.constituent/FundraiserPipeline/Overdue.html" />
  </WebUI>
</WebUIComponent>

<UIActions>

  <UIAction ActionID="OVERDUEASKSCOUNTLINK">
    <ShowPage PageID="673E40CE-EF24-4011-813E-ADDE2287A545" TabID="ad1b2526-b52a-4800-8aea-03ed299c9e2c" SectionID="6ad7cd21-aac9-435d-b2f4-4029efc42d93" LinkedFieldId="OVERDUEASKSCOUNT">
      <ActionContext>FORM!FUNDRAISERID</ActionContext>
    </ShowPage>
  </UIAction>

</UIActions>

---- This is the matching codegen.VB generated automatically -----

_overdueaskscount.Name = "OVERDUEASKSCOUNT"
_overdueaskscount.Caption = "Total Qualified Opportunities (Planned)"
Me.Fields.Add(_overdueaskscount)

_startdate.Name = "STARTDATE"
_startdate.Caption = "Start Date"
Me.Fields.Add(_startdate)
'
_enddate.Name = "ENDDATE"
_enddate.Caption = "End Date"
Me.Fields.Add(_enddate)

_overdueaskscountlink.Name = "OVERDUEASKSCOUNTLINK"
_overdueaskscountlink.Caption = ""
_overdueaskscountlink.PageId = New System.Guid("673E40CE-EF24-4011-813E-ADDE2287A545")
_overdueaskscountlink.TabId = New System.Guid("ad1b2526-b52a-4800-8aea-03ed299c9e2c")
_overdueaskscountlink.SectionId = New System.Guid("6ad7cd21-aac9-435d-b2f4-4029efc42d93")
_overdueaskscountlink.ContextIdDefinition = "FORM!FUNDRAISERID"
_overdueaskscount.LinkedActions.Add(_overdueaskscountlink)
Me.Actions.Add(_overdueaskscountlink)

---- This is the VB code I supplemented for the UIModel of the CustomUIModel for the Widget. ----

Friend Function PopulatedOverdueData()

Dim myFundraiserID As String = "uninitialized"
Dim err2 As String = "no error"
Try
myFundraiserID = Me.RecordId.ToString
Catch e1 As Exception
'Show exception
Return Nothing
End Try

Dim DLReply As DataListLoadReply = GetReconcileDataListOverdue(myFundraiserID, Me.GetRequestContext, err2)

If Not DLReply Is Nothing Then

If DLReply.Rows.Count > 0 Then
For Each DLResultRow As DataListResultRow In DLReply.Rows

Me._overdueaskscount.Value = DLResultRow.Values(0)
Me._overdueaskscountlink.Caption = DLResultRow.Values(0)
Me._overdueaskscountlink.ContextIdDefinition = myFundraiserID
Me._overdueasksamount.Value = DLResultRow.Values(1)

CAN I ADD ANYTHING HERE TO PASS THE START AND STOP DATES?

---- Can I get access to the STARTDATE and ENDDATE parameters of the UIModel of my Listbuilder that is on a separate page ??? ----'

Public Class FundraiserOpportunitiesDrillThroughQueryListFilterUIModel

Private Sub FundraiserOpportunitiesDrillThroughQueryListFilterUIModel_Loaded(ByVal sender As Object, ByVal e As Blackbaud.AppFx.UIModeling.Core.LoadedEventArgs) Handles Me.Loaded

Me.???

CAN I PUT ANYTHING HERE TO RECEIVE THE START AND STOP DATES FROM THE WIDGET WITH THE CUSTOMUIMODEL? *

End Sub

asked by briantl (102 points)

1 Answer

You won't be able to get access to values stored on a different page if they are based on user input aren't being stored in the database.

You will want to pass any parameters to the datalist in the DataListLoadRequest.Parameters property.

answered by chriswhisenhunt (3.9k points)
...