cancel
Showing results for 
Search instead for 
Did you mean: 

Adding fields within a listview?

Former Member
0 Kudos

Hello dear developers SUP.

I'm using version 2.1 of SUP to develop an application for approval of purchase order and need your help to solve a problem I'm facing.

I have a listview with a screen that shows the details of a particular application. I need to make it appear in this list, a field for the description of each item. This description may not be in the header, must be made ​​within the list. The list items are working, but how can I do to create a "label" for a description of each item? example

Item Code: 25

Quantity: 10

Total Value: 256.36

Could someone pass me an example or show me some stuff where I can solve my problem?

Thank you for your attention.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

How do I be able to edit this file? I did as you said, right clicked and chose open with text editor but even so, every time I do it subscribes deployment of workflow and the file gets the original.

Nor could using third-party editing tools

Thanks

david_brandow
Contributor
0 Kudos

There are two choices:

- Turn off the Generate checkbox. This will prevent the HTML from getting overwritten. The very large caveat is that changes you make in the designer will no longer be reflected in the HTML/JS.

- Change the field(s) through custom JavaScript code.

Former Member
0 Kudos

How do I be able to edit this file? I did as you said, right clicked and chose open with text editor but even so, every time I do it subscribes deployment of workflow and the file gets the original.

Nor could using third-party editing tools

-


if you want your changes to get reflected on app you should uncheck the Generate Code check box.

Former Member
0 Kudos

Yes You can add label to each field in list view.

You can do it in path :

Go to==>Generated Workflow==> wprkflow form (whichever you have given while creating with workflow form editor )

==>html==>js==>widgets==>sy.ui.iphone.listview.js (for android choose android)==> Open the file in text editor.

and add code as===> just before (

if( value === '' ) {

// Empty value. Use a filler to maintain row height for the value.

value = '<p></p>';

)

===> if(field.label)

value = field.label + ':' + value;

and edit the line as ===>

var field0 = {id:'f1_attribKey', name:'fieldname' , width:100, height:0, static:true ,font:'normal',dataType:'TEXT',label:'your label '};

var line0=[ field0 ] ;

-


It will affect the the label in your listview..

Let me know if works works & provide the points as your convenience.

Thanks & Regards

Saket

Edited by: amraotkar_saket on Feb 19, 2012 9:06 AM