arnb
April 16, 2019, 1:05pm
1
Please add the defaultValue option to the label setting for child apps.
Why : allows user code to generate an accurate child app name. It may be overridden by the user.
History : It works in ST, although apparently undocumented.
Other : The description option works, but it generates background only text.
Example
label title: "Profile name", defaultValue: "Profile: ${thecontact?.displayName}", required: true
1 Like
Having this would be nice.
In the meantime you can code this in. I use the following code in my ABC app (similar versions for my other parent/child apps).
def initialize() {
if(!app.label || app.label == "default")app.updateLabel(defaultLabel())
}
def defaultLabel() {
return "${buttonDevice} Mapping"
}
2 Likes
arnb
April 16, 2019, 11:05pm
3
Thank you this is working for me.
label title: "Profile name", defaultValue: "Delay: ${thecontact?.displayName}",
description: "Delay: ${thecontact?.displayName}", required: true
if(!app.label)app.updateLabel("Contact: "+thecontact?.displayName)
2 Likes