Hi,
In a method i want to get the value of the property dataProvider of a column/field.
So not the content of the dataprovider but the value that you see
in Servoy developer when you look at the properties of a field.
is something like :
bedr_naam
or
bcrm_bedrijven_to_primaire_vestiging.vstg_hsadres
Regards,
the value of a dataprovider?
But not the records data for that dataprovider?
What do you mean then? What value of the dataprovider do you mean?
The text itself? That is the dataprovider, it is text that is “bedr_naam”
global.testglobal = elements.field.getDataProviderId()
Yes, that is what i meant.
So i have to give the field a name in order to get to the DataProviderId
Thanks,
Hans
yes how else are you getting something? Where do you want to get that value from?
i thougt i also could get it by formname and fieldname.
then i would not have to give each field a name.
But this wil do fine.
Regards,
you say “get it by formname and fieldname”
Yes thats true. so you have to have fieldnames then!
Hi,
Another related question :
Now i want to know the type of the dataprovider (TEXT, NUMBER,etc.)
i have the dataprovider :
forms[_inForm].elements[a].getDataProviderID()
How do i get the type of this provider ?
Regards,
var table = databasemanager.getTable(record_or_foundset);
var column = table.getColumn(dataproviderid);
var type = column.getTypeAsString();
Thanks Johan,
I got my code working now.
Regards,