Good Morning,
Hope you are fine.
I have a query which has GeneralJournalAccountEntry and GenerealJournalEntry as DataSources
i created view with same and added some fields like ledgerdimension,Accountingdate.
I want Fixed asset number from ledger dimension for that i wrote view method to get fixed asset from ledger dimension and added the string field and gave this view method which is fine.
Now i want to get some fields which is customized table (Ex - xyzTable) In this i have fixed asset number and category field.
Now when i am writing a new view method to get category from xyz table how can i compare with fixed asset which is a view method added as field
For Example if the field i am comparing is a datasource field then i can write like below
str sDateTime; sDateTime = SysComputedColumn::returnField(tableStr(VendorInvoiceView), identifierStr(VendInvoiceJour), fieldStr(VendInvoiceJour, createdDateTime));
But in my case the fixed asset is data method added as field in view how can i use view field to compare(fixedasset) with xyztable. (fixed asset). like in above code my field is not bounded to any datasource its a view method.
Dear experts please provide some solution on this.
Regards,
Have a great day.
I suggest you check Martin's answer again, it's very useful. Then decide which approach you want to use.
Dear Nikolaos,
Can you please provide any suggestion on this.
is this not possible ?
Regards.
Dear Experts please provide any help
What i am trying is
1. I have GeneralJournalEntry and GeneralJournalAccountEntry Tables where i have to populate data in my view
2.Created Query with 2 tables(GJAE and GJE).
3.I created view based on query
4.Now i need only fixed asset from ledger dimension in view
so for that i created one compyted column which return fixed asset number from ledger dimension
5.Now i need another table (XYZ Table) record with the help of fixed asset that i have added in step - 4
6.In View methods we can use like this if that is datsource field in view
str sDateTime;
sDateTime = SysComputedColumn::returnField(tableStr(VendorInvoiceView), identifierStr(VendInvoiceJour), fieldStr(VendInvoiceJour, createdDateTime));
7.Now i want to join returned fixed asset i.e in computed column i have to join with another table (Xyz Table) to get data .
The problem here is '?' what should i use in ? place because fixed asset is not a datasource field it is computed column
sDateTime = SysComputedColumn::returnField(tableStr(VendorInvoiceView), identifierStr(?), fieldStr(VendInvoiceJour, ?));
In short how can i join computed column in TSQL Code i.e in another method of same view
A computed column is a piece of T-SQL, so you start by thinking about T-SQL code you want to generate - and whether what you want is feasible at all.
Note if I was you, I probably wouldn't try to do it in a single view. I would reuse or create one view returning the dimension value and I would use it in another view where I could compare the value with other fields. It's looks much easier.
Having a static method, or method running on the server has no impact on the required syntax.
Could you try to describe what you are trying to achieve? Unfortunately I don't understand your requirement if I read your initial message. You write about SysDictTable, comparing fields, and creating computed columns. But I can't figure out what is the actual question.
i am using static server method how can i use field of view to compare with another sysdicttable (xyzTable )
Hi Nikolaos,
Correct its a computed column(which returns FixedAsset)
Regards
What do you mean with a "view method"? Do you mean a computed column?
You can use computed column by calling viewName.ComputedColumnName.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156