Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Replace detail screen label
Replace detail screen label [message #3025] Sat, 14 July 2012 05:57 Go to next message
gpatti is currently offline  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 #3026 is a reply to message #3025] Sat, 14 July 2012 15:41 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
What is the original label, and under what circumstances do you want to change it?

Re: Replace detail screen label [message #3027 is a reply to message #3026] Sat, 14 July 2012 20:07 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
I am getting additional data related to the parent data from another table and I want to display it in the outer section of the list2 screen. This is currently working ok. However, the data is date related so I would like to include the date in the field label e.g. 'new price (effective dd/mm/yy)' as the label, and the price as the value.. I know I could do it with a date field and a price field separately, but would like to streamline the outer section.
Re: Replace detail screen label [message #3028 is a reply to message #3027] Sun, 15 July 2012 03:24 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
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.


Re: Replace detail screen label [message #3029 is a reply to message #3028] Sun, 15 July 2012 04:39 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
On the list1 (parent) screen I have modified the column headings in the way I need, but when I select a row and move to a list2 screen I am unable to show the equivalent data with column heading as the label in the outer area.
Re: Replace detail screen label [message #3030 is a reply to message #3029] Sun, 15 July 2012 04:51 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
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?


Re: Replace detail screen label [message #3031 is a reply to message #3030] Sun, 15 July 2012 10:44 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Not really sure what you are asking me here.

Everything is displaying correctly in the list1 screen, and I have modified the column headings as per the FAQ. They are displaying correcly. When I select a row and go to the list2 screen, the columns, which are now shown as fields in the outer section, are the original (unmodified) labels. I want to know how Ican apply the same modification to the labels when in an outer section of the screen, in the same way you can for the inner section.
Re: Replace detail screen label [message #3032 is a reply to message #3031] Sun, 15 July 2012 11:10 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
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.


Re: Replace detail screen label [message #3033 is a reply to message #3032] Sun, 15 July 2012 12:34 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
OK - Understood that it isn't possible. Perhaps as a better example of why I wanted it might be to think about the example you have in FAQ 109. Here you have modified the labels to show 'Monday 7th April' instead of 'Day#3' etc. I have done a similar thing in my code. However, when the user selects a row of data (e.g. work effort #3 in your example) and views a list2 screen the labels in the outer section will show Day#3, Day#4 etc. instead of the real dates, as it isn't possible to convert these at runtime.
Re: Replace detail screen label [message #3034 is a reply to message #3033] Sun, 15 July 2012 14:44 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
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.


Re: Replace detail screen label [message #3152 is a reply to message #3034] Sat, 17 November 2012 01:09 Go to previous messageGo to next message
jojohuahua is currently offline  jojohuahua
Messages: 3
Registered: November 2012
Junior Member
Thank you! This really helps a lot

Jojo
Re: Replace detail screen label [message #4929 is a reply to message #3034] Tue, 25 August 2015 05:19 Go to previous message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
Refer to replaceScreenHeadings in order to change headings on a LIST screen.

Refer to replaceScreenLabels in order to change labels on a DETAIL screen.



Previous Topic: How to change the screen title of a list1 task
Next Topic: Using Created_Date, Revised_Date
Goto Forum:
  


Current Time: Thu Nov 07 16:03:55 EST 2024

Total time taken to generate the page: 0.01400 seconds