1

I am having this error in my datawindow search function "Expecting STRING expression" Can anyone help me solve the issue. Below is my codes.

In my headerlist ue_search () returns (none) event

string s_criteria

openwithparm(w_fm210search, parent)

s_criteria = Message.StringParm
This.TriggerEvent("ue_findrec", 0, s_criteria)

And in my headerlist ue_findrec () returns (none) event

string  PassedString
long        l_row, l_count

PassedString = String(Message.LongParm, "address")

if trim(PassedString) <> "NULL" then
    // find row
    l_count = This.RowCount()
    l_row = This.Find(PassedString, 1, l_count)

    if l_row = 0 then
        gucc_function.uof_message(032)
        l_row = 1
    end if
    If l_row >= 0 then
        This.ScrollToRow(l_row)
        This.SelectRow(0, FALSE)
        This.SelectRow(l_row, TRUE)
    end if
end if
x'tian
  • 734
  • 2
  • 14
  • 40

1 Answers1

1

I suggest examining this line in your code:

PassedString = String(Message.LongParm, "address")

Generally when you trigger an event with parameters, those parameters are what you use within the event. They are referenced by the names you gave them when you created the event (or the names PB has assigned to them if they not user defined).

I suspect your Message object contains incorrect or NULL values.

Matt Balent
  • 2,337
  • 2
  • 20
  • 23