Replace detail screen label [message #3025] |
Sat, 14 July 2012 05:57 ![Go to next message Go to next message](/theme/default/images/down.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
I read the FAQs on how to replace screen labels at runtime for columns. How do I replace a field label for a detail screen at runtime (specifically for a field in the outer section of a list2 screen)?
|
|
|
|
|
Re: Replace detail screen label [message #3028 is a reply to message #3027] |
Sun, 15 July 2012 03:24 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Labels are supposed to be fixed whereas data is variable.
If you want to display an additional piece of optional data, such as "effective date", then it would be easier to display it in the screen as non-editable data and not a label. You can display it as a secondary field without its own label, whereas you cannot have a label without a field.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Replace detail screen label [message #3030 is a reply to message #3029] |
Sun, 15 July 2012 04:51 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
In order for data to be displayed in any area in the screen you must ensure the following:
1) That the area name in the screen structure file is correct.
2) That the field names in the screen structure file are correct.
3) That the relevant data exists in your object's $fieldarray so that it can be exported to the XML file.
Is the data in the XML file? Is the data specified in the screen structure file?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Replace detail screen label [message #3032 is a reply to message #3031] |
Sun, 15 July 2012 11:10 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
You can only change the column labels when the labels appear above multiple rows of data, i.e. when you have 'columns' and 'rows'.
In a LIST2 screen the 'outer' entity is displayed using a 'detail' layout (single record) while the 'inner' entity is displayed using a 'list' layout (multiple records). The LIST layout provides rows of data with column labels on top, while the DETAIL layout provides field labels and field values side by side.
It is not possible to change field labels in a 'detail' layout, only column labels in a 'list' layout.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Replace detail screen label [message #3034 is a reply to message #3033] |
Sun, 15 July 2012 14:44 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
It is always possible to show the actual date in a data field instead of a label. That is what I have done in my own timesheet application which I used as a model for FAQ 109.
The contents of the screen structure file is read into $GLOBALS['screen_structure'] at the start of the script, so it is possible for you to amend it before it is written out at the end to the XML file. You will have to step through the array so that you can locate the entry which needs to be amended.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|