How to Add an Upload Button to a List Column

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Albert
Posts: 16
Joined: Tue Dec 26, 2023 12:43 am

How to Add an Upload Button to a List Column

Post by Albert »

Hello Friends,

I want to extend my warmest greetings for the New Year to all of you and your families. I hope this year brings you joy, health, and prosperity. :D

I am currently facing a technical challenge and would really appreciate your assistance. Specifically, I'm trying to enhance a list in my project by adding a new column. This column should include a feature that's quite critical for the functionality I'm aiming for: a button that enables users to upload images. Unfortunately, despite my attempts, I haven't been successful in implementing this feature. It's not functioning as expected.

Could you please guide me on how to properly add this image upload button to the list column?

Thank you so much in advance for your time and help.
Attachments
list1.PNG
list1.PNG (235.56 KiB) Viewed 122266 times
Albert
Posts: 16
Joined: Tue Dec 26, 2023 12:43 am

Re: How to Add an Upload Button to a List Column

Post by Albert »

Hello Friends,

I want to add a button to upload files, but this button must be on a list of type 'component DF_T54H1O' because this list is dynamic.

Do you have any suggestions, please ?

I have encountered problems in adding it to the list and having the button displayed according to the list.
Albert
Posts: 16
Joined: Tue Dec 26, 2023 12:43 am

Re: How to Add an Upload Button to a List Column

Post by Albert »

Hello Friends :) ,

I'm currently facing a challenge in my project and would appreciate any guidance or suggestions from this community.

Issue: I need to add a file upload button to a list, specifically of the type 'component DF_T54H1O'. This list is dynamic, and the button should display in accordance with the list items.

What I've Tried: I have attempted to integrate the button into the list, but I'm encountering issues with getting the button to display correctly in alignment with the list elements. :| :| :(

Request for Help: Does anyone have experience with this or similar issues? I'm looking for suggestions or examples of how to successfully implement an upload button in a dynamic list environment like this.

Any advice, code snippets, or resources you could share would be immensely helpful. Thank you in advance for your time and assistance!

Best regards,
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: How to Add an Upload Button to a List Column

Post by MarkDale »

The list in DF_T54H1O is a PRIM_LIST type of list.

The documentation for PRIM_LIST (https://docs.lansa.com/14/en/lansa016/prim_list.htm) gives a good example of how to add a button to a PRIM_LIST

So in the source code for your version of DF_T54H1O you would probably add a line like:

Code: Select all

Define_Com Class(#PRIM_LIST.Button) Name(#Col_4) Parent(#SELECTION) Name(#ColumnButton1) Columnwidth(100) Displayposition(5)  Caption('Upload') Cellsizing(None) Cellwidth(80)
And your program would respond to a click of the button with something like:

Code: Select all

   Evtroutine Handling(#ColumnButton1.Click)
 
      << Do something using #selection.CurrentItem.Entry  to tell you which line on the list was clicked >>

   Endroutine
Post Reply