Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Is lookup dialog possiable with LC?

Avatar

Level 4

Dear all,

In my form I have some dynamic added rows, and for each rows, I have many categories and sub-categories for the user to choice.

And there are so many categories that it make the performance of the form getting very bad.

I wonder if I can make a lookup dialog like the Windows application, so I don't need to:

- Save data of all the categories in the form

- Rebuild the sub-categories drop down for every rows the user add

Regards

Bill

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Bill,

It sounds like you are doing a lot of processing of the data. Are you using a standard dropdown from the Stnadard Object library or a data dropdown from the Custom Object library?

Parallels Desktop1.png

I would recommend the data dropdown, as it comes with data connection script built-in. All you need to do is hook it up to a data connection and tell it what tables/columns to use. The three <value> items is all that you have to change.

Parallels Desktop2.png

I know that the script here is in the initialize event, but just run with that initially. We have used several data dropdowns in forms and have not had too bad a performance.

Give this a try first and if performance is still an issue, try moving this script to the preOpen event. I would strongly recommend Stefan Cameron's blog and in particular:

Connecting a Form to a Database - Stefan Cameron on Forms

Selecting Specific Database Records - Stefan Cameron on Forms

Databases: Inserting, Updating and Deleting Records - Stefan ...

Displaying All Records from an ODBC Data Connection - Stefan ...

There are many more, but these should help.

When I said you could build the dialog natively, I meant Adobe have exposed this method and you can use javascript to build the dialog from scratch. It can be done, but I have done it! If you do a search through the Acrobat (not LC Designer) reference documents for execDialog, you will see the methods that are available.

http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?href...

I use AcroDialog from Windjack Solutions. It is an Acrobat plugin that gives you a drag and drop approach to creating dialogs. You can then copy the javascript that AcroDialog builds for you and paste it into LC Designer, for example into a button event. Then you stitch in the logic, eg where user data inputting into the dialog ends up in a form field or some other action. 

Acrobat1.png

Hope that helps,,

Niall

View solution in original post

26 Replies

Avatar

Level 4

Hi all,

Any information on this?

A "NO" to confirm it is not possible is also welcome.

Regards

Bill

Avatar

Level 10

Hi Bill,

I am not sure what you are trying to achieve, so 'maybe' its possible.

If the categories and sub-categories are in dropdowns then the recommended way to build them is using the preOpen event. This is specific to dropdowns and builds the items 'just in time'.

Maybe if you could post a sample or part of the form it might make it easier.

Niall

Avatar

Level 4

Hi Niall,

Thanks for offering the help.

Here the screenshot to explain my case:

form2.jpg

From left to right, we have "Main Category" (blue rectangle), "Sub Category"(red rectangle) and "Add and Delete Row Buttom" (brown rectangel).

The code is working fine, but we hit some performence problem because:

- We put the category data into the form, and it is quite big and need time to download while opening the form

- We need to rebuild the category and sub-category for each rows, because it is dynamic values from database, and it become very slow when many rows inserted

So, I would like to know if I can make a lookup dialog by:

- Each dynamic row will have a lookup button to lookup value

- By pressing the lookup button, a lookup dialog will pop up for user to search and apply value for row

- The dialog will use web service so the data is not required to save in form

- We will save the key value pair to each row so the row do not need to rebuild the dropdown for rendering

Regards

Bill

Avatar

Level 10

Hi Bill,

I am out of the office today, but if you try moving the database script from the initialise event to the preOpen event of the dropdowns, it may improve performance. Instead of all of the dropdowns making connections at the same time, each one would call just before it is required.

You can build dialogs natively or using AcroDialog from Windjack Solutions (http://www.windjack.com). You could access the data connection from the dialog, but I think the preOpen event will help you.

Niall

Avatar

Level 4

Hi Niall,

Thanks for the prompt reply while out of office.

You are right, we are using the initialize event to build the dropdown, I definitely will try the pre-open event.

If you don't mind, I would like to ask you some more question, because the code style we learn and used seem to have very bad performance.

1) We build the dropdown this way, and I find that it is very bad to both performance and memory, would like to know if we are doing something wrong

- The data of the dropdown is from database, we read the records to XML and pass it to the form via a string binding

- In the form we use XMLData.phase to convert the string into object, and loop it to add items to dropdown

- And yes, these code is written in the initialize event

2) Can you please provide a few keyword to about "build dialogs natively" for me to search for? (We are on the Windows platform)

Thanks in advance

Regards

Bill

Avatar

Level 4

Hi c@tc.se,

Lookup dialog is just like the dropdown list, it will provide a set of value for you to choice but it is difference than the dropdown list in these way:

1) It is a popup dialog

2) Because it is a dialog, you can add control like filter to limit the result set to choice

3) You can apply multi-value to the base form with lookup dialog while with dropdown list you will select value for a single filed only

Here a example image:

http://gigapple.files.wordpress.com/2010/04/ibooks-searching.png?w=609&h=812

Regards

Bill

Avatar

Correct answer by
Level 10

Hi Bill,

It sounds like you are doing a lot of processing of the data. Are you using a standard dropdown from the Stnadard Object library or a data dropdown from the Custom Object library?

Parallels Desktop1.png

I would recommend the data dropdown, as it comes with data connection script built-in. All you need to do is hook it up to a data connection and tell it what tables/columns to use. The three <value> items is all that you have to change.

Parallels Desktop2.png

I know that the script here is in the initialize event, but just run with that initially. We have used several data dropdowns in forms and have not had too bad a performance.

Give this a try first and if performance is still an issue, try moving this script to the preOpen event. I would strongly recommend Stefan Cameron's blog and in particular:

Connecting a Form to a Database - Stefan Cameron on Forms

Selecting Specific Database Records - Stefan Cameron on Forms

Databases: Inserting, Updating and Deleting Records - Stefan ...

Displaying All Records from an ODBC Data Connection - Stefan ...

There are many more, but these should help.

When I said you could build the dialog natively, I meant Adobe have exposed this method and you can use javascript to build the dialog from scratch. It can be done, but I have done it! If you do a search through the Acrobat (not LC Designer) reference documents for execDialog, you will see the methods that are available.

http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?href...

I use AcroDialog from Windjack Solutions. It is an Acrobat plugin that gives you a drag and drop approach to creating dialogs. You can then copy the javascript that AcroDialog builds for you and paste it into LC Designer, for example into a button event. Then you stitch in the logic, eg where user data inputting into the dialog ends up in a form field or some other action. 

Acrobat1.png

Hope that helps,,

Niall

Avatar

Level 4

Hi Niall,

Thanks for the reply, it definitely help.

I have some question currently:

1) It seem that I cannot create a dataConnection for a DB in LC Designer

2) I have sub category which depends on the main category, I am not sure how to write the script so the sub-category will be dfference for each rows

3) How to accesss the dataConnection in the created dialog

But I will try to read all the provided information and play around for a bit first, because I think the answer I want may lay between.

Thanks for all the help.

Regards

Bill

Avatar

Level 10

Hi Bill,

There is a wizard available in LC DEsigner for setting up data connections. There is a Data View in the same pod as the hierarchy. Here you can add and amend data connections by accessing the menu via the small icon (circled).

Parallels Desktop1.png

In the above example, the OriginatorName is a table, where ContactName is used to populate a dropdown list. Then based on the selection that the user makes, three other fields on the form (email, position and contactNumber) are populated from another data connection (OriginatorDetails).

Hope that helps,

Niall

Avatar

Level 4

Hi Niall,

Many thanks to the prompt reply, my problem is as follow (Please check the screenshot):

dc-dialog.jpg

I don't have any choice others then WSDL, while the database example use OLE DB.

Regards

Bill

Avatar

Level 10

ahh,

I will have to look at that, I am not sure why the other options are not available. Here is what I am seeing here:

Parallels Desktop1.png

Maybe someone else may have an idea.

Niall

Avatar

Former Community Member

Where did your Designer come from (SAP, stand alone, CS5, Acrobat, Workbench)? What OS are you running on? If you create a new empty form and try to add a data connection do you still only get the single WSDL option?

Paul

Avatar

Former Community Member

Niall,

Which program(s) do you use to do the screen capture and annotations that you put into your posts?  They are really slick!

David

Avatar

Level 10

Hi,

I use LittleSnapper for Mac screen captures (http://www.realmacsoftware.com/littlesnapper/) and SnagIt for Windows (http://www.techsmith.com/screen-capture.asp).

Good luck,

Niall

Avatar

Level 4

Hi Paul,

Thanks for asking.

The designer is calling form workbench.

Here is the list of combination I tried:

1) ES2 SP1 workbench / ES2 SP1 Designer > Result: OLEDB not found

2) ES2 SP1 workbench / ES2 Designer > Result: OLEDB not found

3) 8.2.1 workbench / 8.2.1 Designer > Result: OLDDB found

And with a new form in ES2, I got the following:

dc-dialog2.jpg

Regards

Bill

Avatar

Former Community Member

Do you have administrtaive rights on your machine? I am wondering if you do not have the rights in Windows to create a DSN then is Designer aware of this and will not give you the option?

If you go into control panel can you create a DSN?

Paul

Avatar

Level 4

Hi Paul,

I can create DSN without no problem, and  as I said in last mail, OLEDB can be found in 8.2.1

Regards

Bill

Avatar

Former Community Member

Did you get your Designer as part of an SAP install?

Other than that I have no idea why you do not have the OLEDB option.

Paul

Avatar

Level 4

Hi Paul,

My designer is not part of the SAP install, but developer machine did have SAP GUI installed.

But because this problem can also be found on the server machine (Which do not have SAP GUI), so, I think they are not related.

Regards

Bill