Hi, since I think it’s not possible now, I have put this under feature requests.
Would it be possible to get the option to set the displaytype of a field by scripting. I would like to use this in the area where I use the same form for data entry and viewing data. When used for data entry, I want the field to be a combobox, when the form is used for viewing, I just want a normal field.
In addition to this, connecting a valuelist to a field through scripting would be nice as well.
Paul
When used for data entry, I want the field to be a combobox, when the form is used for viewing, I just want a normal field.
here’s a way:
1)create an onShow method to your form
2) create myField twice.
once as text with name property “myTextView”
once as valuelist with name property “myTextEntry”
3)place on top of each other.
4)script
if(dataEntry ==1) //dataEntry is set before navigating to your list.
{
elements.myFieldEntry.visible=true
elements.myFieldView.visible=false
}
else if(dataEntry ==0)
{
elements.myFieldEntry.visible=false
elements.myFieldView.visible=true
}
This is what I curretnly do, yes. Sorry, must have told that as well.
The feature request is to do it in a nicer way. The reason for this is that now, in security you have two fields that can be enabled/disabled.
With my request you would only have 1.
The reason I’m asking for this is that I’m trying to set up a way of letting an administrator user (not develloper) manage the application. Meaning: he/she has control over the pofiles and which fields are enabled/disabled in the profile. If there are two elements on top of eachother, this might be a bit confusing.
pbakker:
The reason I’m asking for this is that I’m trying to set up a way of letting an administrator user (not develloper) manage the application. Meaning: he/she has control over the pofiles and which fields are enabled/disabled in the profile. If there are two elements on top of eachother, this might be a bit confusing
Hi Paul,
Have you considered using a field for dataEntry and a label for data viewing?
Also - I find that naming conventions help. You could use “de_xxx” for Data Entry fields and “vd_xxx” for View Data (labels). It makes it LOTS easier when setting up security or showing/hiding or whatever if you keep the names descriptive.