Highlighted
Super Contributor.
Super Contributor.
507 views

Creating Wizard - for Quick Search

Jump to solution

Hello Expert,

I had never created wizard yet, I want to create simple wizard for the search record on my customized page.

I tried to create a wizard like 'Assets quick search'. But I didnt understand the process of wizard creation.

Can anyone please guide me on this!!!!

Quick help appreciated!!!

Thanks,

Pooja

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.
Super Contributor.

Hello Mark,

Thanks for your reply. I have created the wizard for my search. and its works for me! 😉

I got some hint by refering the "Asset Quick Search" wizard, The script written for these wizard help me to create a script for my search criteria. 

Below are my script,

Tools->Action->Edit->New

Name: ApplicationquickSearch

Context: (no Table)

Type: Wizard

In Text Editor write down below script,

ConfirmCancel = 0
Global = ""
MultiTenants = -1
Name = "qbe_Application"
Title = "Query Application by example"
Version = "17050"
{ Page Filter
OnEnter = ""
Title = "Application quick search"
{ LinkEdit f_Appt_ApplicationName
Filter = ""
Label = AmGetFieldLabelFromName("amSoftwarePricing","Appt")
LabelLeft = 1
Table = "amApplications"
Value = 0
Xoffset = 2000
}
{ CommandButton CommandButton1
Caption = "Execute search with above values"
{ Click =
RetVal=AmExecTransition({ExecQBE})
}
Height = 400
Indent = 0
Label = ""
Width = 3000
}
{ Transition ExecQBE
To = "Finish"
}
}

{ Finish Finish
{ Do =
Dim strFilter As String
Dim strOperator As String

'If {Filter.f_Appt_ApplicationName} <> "" Then
' strFilter = strFilter & " AND Appt.ApplicationName LIKE " & AmAqlTextConst({Filter.f_Appt_ApplicationName})
'End If
If {Filter.f_Appt_ApplicationName} <> "" Then

Dim LErr as Long
Dim lRecAppQry as long
Dim APPFullName as String

LRecAppQry = AmQueryCreate()

lErr = AmQueryGet(lRecAppQry, "SELECT ApplicationName FROM amApplications WHERE lApplicationsId=" & {Filter.f_Appt_ApplicationName})
APPFullName = AmGetFieldStrValue(lRecAppQry, 0)

AmReleaseHandle(LRecAppqry)

strFilter = strFilter & " AND Appt.ApplicationName Like '" & APPFullName & "%'"

End If


If strFilter <> "" Then
strFilter = RightPartFromLeft(strFilter, "AND", 0)
End If
RetVal = AmOpenScreen("amSoftwarePricing","",strFilter,1,"")
}
Summary = 0
}

 

Thanks,

Pooja

View solution in original post

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Wizards can be quite complex and cannot be designed/developed quickly or explained thoroughly in this forum.  I would suggest reviewing Chapter 14 in advanced use pdf guide or see help for wizards.

Out of the box there is new functionality where search wizards/screens can be used/started upon certain table screens opening.  There is an Edit\Options parameter that can be turned on/off for these to work.

I am not an expert with this new functionality, however, I don't believe there are actual wizards for this.  There seems to be a QBE attribute under Designer application > Screens where field SQLNames can be set and the system may automatically start a behind the scenes query search wizard based on these fields when the related table screen is opened.

This may just mean setting this attribute on your custom table screen, having parameter on, and opening said screen in the Client / Web Client.

Good luck.

Highlighted
Super Contributor.
Super Contributor.

Hello Mark,

Thanks for your reply. I have created the wizard for my search. and its works for me! 😉

I got some hint by refering the "Asset Quick Search" wizard, The script written for these wizard help me to create a script for my search criteria. 

Below are my script,

Tools->Action->Edit->New

Name: ApplicationquickSearch

Context: (no Table)

Type: Wizard

In Text Editor write down below script,

ConfirmCancel = 0
Global = ""
MultiTenants = -1
Name = "qbe_Application"
Title = "Query Application by example"
Version = "17050"
{ Page Filter
OnEnter = ""
Title = "Application quick search"
{ LinkEdit f_Appt_ApplicationName
Filter = ""
Label = AmGetFieldLabelFromName("amSoftwarePricing","Appt")
LabelLeft = 1
Table = "amApplications"
Value = 0
Xoffset = 2000
}
{ CommandButton CommandButton1
Caption = "Execute search with above values"
{ Click =
RetVal=AmExecTransition({ExecQBE})
}
Height = 400
Indent = 0
Label = ""
Width = 3000
}
{ Transition ExecQBE
To = "Finish"
}
}

{ Finish Finish
{ Do =
Dim strFilter As String
Dim strOperator As String

'If {Filter.f_Appt_ApplicationName} <> "" Then
' strFilter = strFilter & " AND Appt.ApplicationName LIKE " & AmAqlTextConst({Filter.f_Appt_ApplicationName})
'End If
If {Filter.f_Appt_ApplicationName} <> "" Then

Dim LErr as Long
Dim lRecAppQry as long
Dim APPFullName as String

LRecAppQry = AmQueryCreate()

lErr = AmQueryGet(lRecAppQry, "SELECT ApplicationName FROM amApplications WHERE lApplicationsId=" & {Filter.f_Appt_ApplicationName})
APPFullName = AmGetFieldStrValue(lRecAppQry, 0)

AmReleaseHandle(LRecAppqry)

strFilter = strFilter & " AND Appt.ApplicationName Like '" & APPFullName & "%'"

End If


If strFilter <> "" Then
strFilter = RightPartFromLeft(strFilter, "AND", 0)
End If
RetVal = AmOpenScreen("amSoftwarePricing","",strFilter,1,"")
}
Summary = 0
}

 

Thanks,

Pooja

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.