Unable to create a dynamic form field label

Discuss about Group-Office development here

Moderator: Developers

heidi@sqcoy.fi
Posts: 6
Joined: Fri Dec 09, 2016 10:01 am

Unable to create a dynamic form field label

Postby heidi@sqcoy.fi » Wed Apr 28, 2021 9:08 am

I am working with Group-Office 6.4.128. Yes, I know it's old version but I will upgrade it later. I have done a custom module and I am trying to create a dynamic form field label. I want to get a label from dB and use it as a form fieldLabel. Here is my code:

Code: Select all

let headers = me.getHeader(templateId);
console.log(headers);//this is undefined
getHeader(reportTemplateId) {
//get header from store
go.Db.store("ReportHeader").query({
filter: {
reportTemplateId:reportTemplateId
}}).then(function(result) {
go.Db.store("ReportHeader").get(result.ids, function(headers) {
console.log(headers);//ok
return headers;//not "working"
});
});
}
I also tried to do something with Promise Resolve, but I cannot get it working. Any help is appreciated!

Who is online

Users browsing this forum: No registered users and 1 guest