Item order in a group


(Webfeger) #1

Hello,

i want to use a group element with subitems.

how can i fixing the order of item elements? actually it’s based on state or textcontent and this can’t use for sort order.

Here’s the code:

eventlog.items:

Group gEventLog "EventLog" (All)

    String EventLog00   "[%s]" (gEventLog)
    String EventLog01   "[%s]" (gEventLog)
    String EventLog02   "[%s]" (gEventLog)
    String EventLog03   "[%s]" (gEventLog)
    String EventLog04   "[%s]" (gEventLog)
    String EventLog05   "[%s]" (gEventLog)
    String EventLog06   "[%s]" (gEventLog)
    String EventLog07   "[%s]" (gEventLog)
    String EventLog08   "[%s]" (gEventLog)
    String EventLog09   "[%s]" (gEventLog)
    String EventLog10   "[%s]" (gEventLog)
    String EventLog11   "[%s]" (gEventLog)
    String EventLog12   "[%s]" (gEventLog)
    String EventLog13   "[%s]" (gEventLog)
    String EventLog14   "[%s]" (gEventLog)
    String EventLog15   "[%s]" (gEventLog)
    String EventLog16   "[%s]" (gEventLog)
    String EventLog17   "[%s]" (gEventLog)
    String EventLog18   "[%s]" (gEventLog)
    String EventLog19   "[%s]" (gEventLog)

    Group gEventInternal "Event Vars" (All)
    String  EventLog     " Event[%s]" (gEventInternal)

sitemap:

Frame label="EventLog" {
    Group item=gEventLog
  }

(lipp_markus) #2

Sorry, but this is not possible. If you use a group as an item in your sitemap, you have no control over any aspects of order or appearance in the sitemap. If you want to influence the order or appearance, you will need to handcode all items in your frame.


(Webfeger) #3

thats strange… there are no other options to see history data?

here an example with current issue:

Group gEventLog "EventLog" (All)

String EventLog00   "001: [%s]" (gEventLog)
String EventLog01   "002: [%s]" (gEventLog)
String EventLog02   "003: [%s]" (gEventLog)
String EventLog03   "004: [%s]" (gEventLog)
String EventLog04   "005: [%s]" (gEventLog)
String EventLog05   "006: [%s]" (gEventLog)
String EventLog06   "007: [%s]" (gEventLog)
String EventLog07   "008: [%s]" (gEventLog)
String EventLog08   "009: [%s]" (gEventLog)
String EventLog09   "010: [%s]" (gEventLog)
String EventLog10   "011: [%s]" (gEventLog)
String EventLog11   "012: [%s]" (gEventLog)
String EventLog12   "013: [%s]" (gEventLog)
String EventLog13   "014: [%s]" (gEventLog)
String EventLog14   "015: [%s]" (gEventLog)
String EventLog15   "016: [%s]" (gEventLog)
String EventLog16   "017: [%s]" (gEventLog)
String EventLog17   "018: [%s]" (gEventLog)
String EventLog18   "019: [%s]" (gEventLog)
String EventLog19   "020: [%s]" (gEventLog)

Group gEventInternal "Event Vars" (All)

result:

your code goes here

(Rolf Vermeer) #4

Maybe this discussion might help?


(Webfeger) #5

I found a solution: using subframe without grouping items:

  sitemap kontakt label="Kontaktsensoren" {
  Frame label="Eingangstür" {
		Text item=Door_Eingang_OpenStatus label="Zustand [%s]"
		Text item=Door_Eingang_LastOpened label="Änderung [%1$td.%1$tm.%1$ty %1$tH:%1$tM]" 
		Text item=Door_Eingang_Battery  label="Batterie [%d %%]"
		Text item=Door_Eingang_ThingStatus label="Gerätestatus [%s]"
	
		Text label="Event Log"  {
			Frame label="" {
				Text item=EventLog00  label="[%s]"
				Text item=EventLog01  label="[%s]"
				Text item=EventLog02  label="[%s]"
				Text item=EventLog03  label="[%s]"
				Text item=EventLog04  label="[%s]"
				Text item=EventLog05  label="[%s]"
				Text item=EventLog06  label="[%s]"
				Text item=EventLog07  label="[%s]"
				Text item=EventLog08  label="[%s]"
				Text item=EventLog09  label="[%s]"
				Text item=EventLog10  label="[%s]"
				Text item=EventLog11  label="[%s]"
				Text item=EventLog12  label="[%s]"
				Text item=EventLog13  label="[%s]"
				Text item=EventLog14  label="[%s]"
				Text item=EventLog15  label="[%s]"
				Text item=EventLog16  label="[%s]"
				Text item=EventLog17  label="[%s]"
				Text item=EventLog18  label="[%s]"
				Text item=EventLog19  label="[%s]"					
			}
		}
	}
}

(Vincent Regaud) #6

Which gets you back the @lipp_markus post #2 where he gave you the solution.
Please tick the solution post, Thanks