Info | ||
---|---|---|
| ||
With Advanced settings for Custom Fields functionality you can: 1) create new data structures :
2) define custom views and advanced sharing
What is a considered as a "custom field" for flex.bi ?
Where to find Advanced settings ? How to use this function? STEP 1 Define what you want to add in “Advanced settings” sectioning XXX language. STEP 2 Select in Cube Properties section — Custom Fields section what you want to import and how. |
Watch a Demonstration here :
Youtube macro width 300 aspectRatio 4 / 3 url https://www.youtube.com/watch?v=BOmOgM-TLV8 height 200
...
Advanced setting key components & detailed instructions for Standard ERP
...
Code Block |
---|
[ORVc.LangCode] name = "Language code" cube_name = "HansaWorld Sales Orders" data_type = "string" dimension_name = "Sales Order" level_name = "Sales Order" dimension = true |
Example of custom measure definition with javascript that imports the row gross profit but turns the numbers negative:
Code Block |
---|
[QtVcQTVc.negative_rowGP] name = "Quotation negative GP" cube_name = "HansaWorld Quotations" data_type = "decimal" dimension_name = "Quotation" level_namerest_api_item_field = "Quotation Itemrows" measure = true javascript_code =''' if (doc.rows) { doc.rows.forEach(function(row){ row.negative_rowGP = String(Number(row.rowGP) * -1); }) } ''' |
...
Code Block |
---|
[INVc.item_code] name = 'Item Code' dimension_name = 'ItemItem2' cube_name = "HansaWorld Invoices" rest_api_field = "Code" key_field = true |
...
Code Block |
---|
[INVc.item_name] name = 'Item Name' dimension_name = 'ItemItem2' cube_name = "HansaWorld Invoices" name_field = true rest_api_field = "Name" |
...
Code Block |
---|
[IVVc.item_code_bind] name = 'Item Code bind' dimension_namerest_api_item_field = 'Invoice' level"rows" cube_name = 'Invoice Item' cube_name = "HansaWorld Invoices" for_custom_dimension = 'ItemItem2' bind_field_name = 'item_code' rest_api_field = 'ArtCode' |
...
Code Block |
---|
[TdmGramatSL.customer_code] default_custom_field = true name = 'Transaction Customer Code' dimension_name = 'Transaction' cube_name = 'Horizon Financials' for_custom_dimension = 'Customer' bind_field_name = 'customer_code' rest_api_field = 'D.K.KODS' [TDdmKlBaseSar.customer_type_code] default_custom_field = true name = 'Customer Type Code' dimension_name = 'Customer' level_name = 'Customer Type' cube_name = 'Horizon Financials' key_field = true rest_api_field = 'K.KTIPS' dimension_in_separate_table = true [TDdmKlBaseSar.customer_type_name] default_custom_field = true skip_request = true rest_api_field = 'T.NOSAUK' name = 'Customer Type Name' dimension_name = 'Customer' level_name = 'Customer Type' cube_name = 'Horizon Financials' name_field = true dimension_in_separate_table = true javascript_code = ''' cust_type = doc.K_KTIPS; switch(cust_type) { case "0": doc.T_NOSAUK = "Active"; break; case "1": doc.T_NOSAUK = "Potential"; break; } ''' [TDdmKlBaseSar.customer_code] default_custom_field = true name = 'Customer Code' dimension_name = 'Customer' cube_name = 'Horizon Financials' rest_api_field = "K.KODS" key_field = true dimension_in_separate_table = true [TDdmKlBaseSar.customer_name] default_custom_field = true name = 'Customer Name' dimension_name = 'Customer' cube_name = 'Horizon Financials' name_field = true rest_api_field = "K.NOSAUK" dimension_in_separate_table = true |
In the example below, a
...
combination of Price List, Price and Customer registers are used to create 3 level hierarchy.
Code Block |
---|
[FinancialDocLinePLVc.currencyF_idPriceList] default_custom_field = true name = 'TransactionPrice CurrencyList IDCode' dimension_name = 'TransactionPrice' cube_name = 'JumisHansaworld FinancialsInvoices' forlevel_custom_dimensionname = 'Currency' bindPrice list' rest_api_field_name = 'currency_id' rest_api_"PLCode" key_field = 'FinancialDocLine.CurrencyID'true [CurrencyPLVc.currencyF_codePriceListName] default_custom_fieldname = true 'Price List Name' dimension_name = 'Currency CodePrice' dimensioncube_name = 'CurrencyHansaworld Invoices' cubelevel_name = 'JumisPrice Financialslist' rest_api_field = "CurrencyCodePLCode" keyname_field = true dimension_in_separate_table = true [CurrencyPLVc.currencyF_namePriceItemCode] default_custom_field = true name = 'CurrencyPrice Item NameCode' dimension_name = 'CurrencyPrice' cube_name = 'JumisHansaworld FinancialsInvoices' level_name_field = true'Item' rest_api_field = "DescriptionArtCode" dimension_in_separate_tablekey_field = true [CurrencyPLVc.currencyF_idPriceItemName] default_custom_field = true name = 'CurrencyPrice Item IDName' dimension_name = 'CurrencyPrice' cube_name = 'JumisHansaworld FinancialsInvoices' sourcelevel_id_fieldname = true'Item' rest_api_field = "CurrencyIDComment" dimension_in_separate_tablename_field = true |
In the example below field FinancialDocLine.status_code has to be used twice so bind_field_name field is used to reference the same field twice.
Code Block |
---|
[FinancialDocLine.status_code] rest_api_field = 'FinancialDoc.Disbursement' default_custom_field = true [PLVc.F_PriceCustomerCode] name = 'Price Customer Code' dimension_name = 'Price' cube_name = 'DisbursementHansaworld Status CodeInvoices' dimensionlevel_name = 'Disbursement StatusCustomer' cube_name = 'Jumis Financials' dimension_in_separate_tablerest_api_field = true"CustCode" key_field = true [FinancialDocLinePLVc.statusF_name] skip_request = true default_custom_field = true PriceCustomerName] name = 'DisbursementPrice StatusCustomer Name' dimension_name = 'Disbursement StatusPrice' cube_name = 'JumisHansaworld FinancialsInvoices' dimension_in_separate_tablelevel_name = true name_field = true [FinancialDocLine.a_disbursement_flag] 'Customer' rest_api_field = 'FinancialDoc.Disbursement' default_custom"CustCode" name_field = true [IVVc.PriceListProperty] name = 'Transaction"Price Documentlist Disbursement Flag' dimensionProperty" cube_name = 'TransactionHansaworld Invoices' fordata_custom_dimensiontype = 'Disbursement Status' cube"string" dimension_name = 'Jumis FinancialsInvoice' bindlevel_field_name = 'status_codeInvoice' javascriptrest_api_codefield = 'PriceList'' if (doc.FinancialDocDisbursement[IVVc.RowPriceListCode] name === true)'Invoice Price List {doc.FinancialDocDisbursementCode' cube_name = 'trueHansaworld Invoices'} elsefor_custom_dimension = 'Price' {doc.FinancialDocDisbursement for_custom_dimension_level = 'false'}; ''' |
In the example below, a combination of Price List, Price and Customer registers are used to create 3 level hierarchy.
Code Block |
---|
[PLVc.F_PriceList]
name = 'Price List Code'
dimension_name = 'Price'
cube_name = 'Hansaworld Invoices'
level_name = 'Price list'
rest_api_field = "PLCode"
key_field = true
[PLVc.F_PriceListName]
name = 'Price List Name'
dimension_name = 'Price'
cube_name = 'Hansaworld Invoices'
level_name = 'Price list'
rest_api_field = "PLCode"
name_field = true
[PLVc.F_PriceItemCode]
name = 'Price Item Code'
dimension_name = 'Price'
cube_name = 'Hansaworld Invoices'
level_name = 'Item'
rest_api_field = "ArtCode"
key_field = true
[PLVc.F_PriceItemName]
name = 'Price Item Name'
dimension_name = 'Price'
cube_name = 'Hansaworld Invoices'
level_name = 'Item'
rest_api_field = "Comment"
name_field = true
[PLVc.F_PriceCustomerCode]
name = 'Price Customer Code'
dimension_name = 'Price'
cube_name = 'Hansaworld Invoices'
level_name = 'Customer'
rest_api_field = "CustCode"
key_field = true
[PLVc.F_PriceCustomerName]
name = 'Price Customer Name'
dimension_name = 'Price'
cube_name = 'Hansaworld Invoices'
level_name = 'Customer'
rest_api_field = "CustCode"
name_field = true
[IVVc.PriceListProperty]
name = "Price list Property"
cube_name = 'Hansaworld Invoices'
data_type = "string"
dimension_name = 'Invoice'
level_name = 'Invoice'
rest_api_field = 'PriceList'
[IVVc.RowPriceListCode]
name = 'Invoice Price List Code'
cube_name = 'Hansaworld Invoices'
for_custom_dimension = 'Price'
for_custom_dimension_level = 'Price list'
bind_field_name = 'F_PriceList'
rest_api_item_field = "rows"
javascript_code = '''
if (doc.rows) {
doc.rows.forEach(function(row){
if (doc.PriceList){
row.RowPriceListCode = doc.PriceList;
}
})
}
'''
[IVVc.ArtCode]
name = 'Invoice Item Code'
cube_name = 'Hansaworld Invoices'
for_custom_dimension = 'Price'
for_custom_dimension_level = 'Item'
bind_field_name = 'F_PriceItemCode'
rest_api_item_field = "rows"
[IVVc.RowCustCode]
name = 'Invoice Customer Code'
cube_name = 'Hansaworld Invoices'
for_custom_dimension = 'Price'
for_custom_dimension_level = 'Customer'
bind_field_name = 'F_PriceCustomerCode'
rest_api_item_field = "rows"
javascript_code = '''
if (doc.rows) {
doc.rows.forEach(function(row){
if (doc.CustCode){
row.RowCustCode = doc.CustCode;
}
})
}
'''
|
In the example below, account_code value will be populated from the credit_account_code for the credit transaction and from debit_account_code for debit transaction.
Code Block |
---|
[FinancialDocLine.account_code]
skip_request = true
default_custom_field = true
name = 'Transaction Account Code'
dimension_name = 'Transaction'
cube_name = 'Jumis Financials'
for_custom_dimension = 'Account'
bind_field_name = 'account_code'
credit_debit_dimension_column = true
[FinancialDocLine.credit_account_code]
default_custom_field = true
name = 'Credit Account Code'
dimension_name = 'Transaction'
cube_name = 'Jumis Financials'
rest_api_field = 'CreditAccount.AccountCode'
[FinancialDocLine.debit_account_code]
default_custom_field = true
name = 'Debit Account Code'
dimension_name = 'Transaction'
cube_name = 'Jumis Financials'
rest_api_field = 'DebetAccount.AccountCode'
dimension_in_separate_table = true |
In the example below a new cube is build for Jumis application build on Payment Orders:
Code Block |
---|
[PaymentOrder.Amount] default_custom_field = true cube_name = 'Jumis Payment Order' name = 'Amount' dimension_name = 'Payment Order' measure = true [PaymentOrder.PaymentOrderID] default_custom_field = true name = 'Payment Order ID' dimension_name = 'Payment Order' cube_name = 'Jumis Payment Order' source_id_field = true rest_api_field = "PaymentOrderID" dimension_in_separate_table = true [PaymentOrder.PaymentOrderNo] default_custom_field = true name = 'Payment Order No' dimension_name = 'Payment OrderPrice list' bind_field_name = 'F_PriceList' rest_api_item_field = "rows" javascript_code = ''' if (doc.rows) { doc.rows.forEach(function(row){ if (doc.PriceList){ row.RowPriceListCode = doc.PriceList; } }) } ''' [IVVc.ArtCode] name = 'Invoice Item Code' cube_name = 'JumisHansaworld Payment OrderInvoices' restfor_apicustom_fielddimension = 'PaymentOrderNoPrice' dimensionfor_incustom_separatedimension_tablelevel = true'Item' keybind_field_name = true [PaymentOrder.Comments] default_custom_field = true'F_PriceItemCode' rest_api_item_field = "rows" [IVVc.RowCustCode] name = 'PaymentInvoice OrderCustomer CommentsCode' dimensioncube_name = 'PaymentHansaworld OrderInvoices' cubefor_custom_namedimension = 'Jumis Payment Order' rest_api_field'Price' for_custom_dimension_level = 'Customer' bind_field_name = 'CommentsF_PriceCustomerCode' dimensionrest_inapi_separateitem_tablefield = true"rows" name_field = true [PaymentOrder.PaymentOrderID2] default_custom_field = true name = 'Payment Order ID bind' dimension_name = 'Payment Order' cube_name = 'Jumis Payment Order' for_custom_dimension = 'Payment Order' bind_field_name = 'PaymentOrderID' rest_api_field = 'PaymentOrderID' [PaymentOrder.PaymentOrderDate] default_custom_field = true dimension_in_separate_tablejavascript_code = ''' if (doc.rows) { doc.rows.forEach(function(row){ if (doc.CustCode){ row.RowCustCode = doc.CustCode; } }) } ''' |
In the example below, account_code value will be populated from the credit_account_code for the credit transaction and from debit_account_code for debit transaction.
Code Block |
---|
[FinancialDocLine.account_code] skip_request = true default_custom_field = true name = 'PaymentTransaction OrderAccount DateCode' dimension_name = 'Payment OrderTransaction' cube_name = 'Jumis Payment OrderFinancials' restfor_apicustom_fielddimension = 'PaymentOrderDateAccount' databind_field_typename = 'dateaccount_code' importcredit_debit_sortdimension_datecolumn = true for_standard_dimension = "Time" [PaymentOrder.CurrencyIDFinancialDocLine.credit_account_code] default_custom_field = true name = 'Payment Order Currency ID' dimension_name = 'Payment Order' cube_name = 'Jumis Payment Order' for_custom_dimensionCredit Account Code' dimension_name = 'CurrencyTransaction' bindcube_field_name = 'currency_idJumis Financials' rest_api_field = 'CurrencyIDCreditAccount.AccountCode' [PaymentOrder.PartnerIDFinancialDocLine.debit_account_code] default_custom_field = true name = 'PaymentDebit OrderAccount Partner IDCode' dimension_name = 'Payment OrderTransaction' cube_name = 'Jumis Payment OrderFinancials' forrest_customapi_dimensionfield = 'PartnerDebetAccount.AccountCode' binddimension_field_name = 'partner_id' rest_api_fieldin_separate_table = 'PartnerID'true |