How to match detail with certain period in Webi - business-objects

I trying my best to make simple compilation (similar to VLOOKUP in Excel) but I am getting all the time #MULTIVALUE error
(I know the meaning of this error and it's correct because we have more than one line per registration number) or even empty cell... So what I need is limit somehow the detail to specific period.
desired output:
We have two tables (from diffrent universes) and as you can see in one we are storing the claims but second one is storing the insurance parameters and additional fee. Basically if the claim has been happened in specific period then the detail should show the correct value (0 or 500).
I cant base on the insurance number, as one of the source is not storing such data.
I am aware if I will able to assign the correct addiitonal fee (new detal created) I also will be able to assing correct Insurance Number from specific period(Ins no)
similar thread on sap answers

Related

How to Filter Data in a Single MySQL Database Field that has Multiple Entries

On our Wordpress site, we use a plugin called s2member and it stores the levels (roles) of our clients as well as the times they were assigned a specific level in our database. I would like to create a table that shows when a user was assigned a specific level. I'm having a challenge getting the data I need because of the way the data is stored in the field. It stores all of the levels along with the associated dates and times when a user's level was changed in one field. In addition, it stores all of the times as Unix timestamps. Here's an example of a typical field associated with a client:
a:20:{s:15:"1562695223.0001";s:6:"level0";s:15:"1562695223.0002";s:6:"level1";s:15:"1562695223.0003";s:6:"level2";s:15:"1562695223.0004";s:6:"level3";s:15:"1577906312.0001";s:11:"ccap_prepay";s:15:"1596575898.0001";s:12:"-ccap_prepay";s:15:"1596575898.0002";s:13:"ccap_graduate";s:15:"1596575898.0003";s:11:"ccap_prepay";s:15:"1596575898.0004";s:7:"-level3";s:15:"1597196952.0001";s:14:"-ccap_graduate";s:15:"1597196952.0002";s:12:"-ccap_prepay";s:15:"1597196952.0003";s:13:"ccap_graduate";s:15:"1597196952.0004";s:11:"ccap_prepay";s:15:"1598382433.0001";s:14:"-ccap_graduate";s:15:"1598382433.0002";s:12:"-ccap_prepay";s:15:"1598382433.0003";s:11:"ccap_prepay";s:15:"1598382433.0004";s:6:"level3";s:15:"1605290551.0001";s:12:"-ccap_prepay";s:15:"1605290551.0002";s:11:"ccap_prepay";s:15:"1605290551.0003";s:13:"ccap_graduate";}
There are four columns in this table: umeta_id; user_id; meta_key; meta_value. The data above is stored in the meta_value column.
You'll notice that it also has multiple ccap_* entries. CCAP stands for custom capapability and I would like to be able to chart those assignments and associated times as well.
Do you have any idea how I can accomplish this?
Thank you for any help you can give.
I talked to an engineer about this and he told me that I would need to learn Python and I believe he said I would need to learn how to also use Pandas and Numpy to extract the data I need but he wasn't exactly sure. I started taking a data analyst course on Coursera but I still haven't learned what I need to learn and it's already been several months. It would be great if someone could provide a solution that I could implement more quickly and use on an ongoing basis.
If there's a way to accomplish my goal by exporting this table to a CSV file and using Microsoft Excel or Google Sheets, I'm open to that too.
Here's an image of the table (if it helps):
Database table
Here's an example of my desired output:
Desired output
In my desired output, I used Excel and created a column that converts the Unix timestamp to a short date and another column where I used a nested IF statement to convert the CCAP or level to its meaning that we understand internally.

How do I prevent creating a new record in MS Access 2010 before the current record is correctly saved into the table

Situation
I've created a database for making invoices and similar documents. As we know these documents must be numerated progressively and univocally without any missing number from one invoice (or other document) and the following.
For this reason I added an auto-number field to the table that is the number of the invoice or other document.
As we know MS Access creates a further new record just in the moment something is inserted / edited into the current/new record. So there is a new record no mater what, just right after the user has been started editing the former new record.
So if the db user starts editing a new invoice (or any other doc) just for doing exercise or practice without the will to save and print it but just exiting from the record with the Esc key when he makes mistakes or meet problems that cannot solve yet, a documento number is lost and a hole in numbering remains that cannot be recovered in next new record no mater what.
The problem to solve
How do I set MS Access to create a new record not when the previous former new record is just edited but when it is saved by the user? In this way missing numbering in auto-number fields will be prevented.
In other words how do I populate an auto-number field only when the record is "officially saved" instead of in the moment I start editing the new record?
autonumbers are for internal use only (that means you the develper of the application). For example, when you load a word document, the OS issues a memory segment location - you as a user of word don't care.
The same goes for autonumbers. They are for developers to create relationships between tables. they CAN NOT be used for things like invoice numbers etc.
Even if you move to a new record, start typing, the record is NOT yet saved. However, a NEW auto number will have been issued. If the user hits ESC key, or edit->un to NOT save the record, then the auto number will have not been saved - but now you have a gap in auto numbers. So if a user decides to not save a record, but has started typing in that record, the auto number is issued (and used up). However, if you don't save that record, and the user decides to not add (save) the record, then you will find a gap.
As a result, it is not practical to attempt to use auto numbers this way. You will find the same for Oracle, SQL server, and the vast majority of database systems. The simple and bottom line is such numbers are for you the developer to create and setup relationships. They have ZERO to do with things like invoice numbers etc.
Auto numbers are for relationships. The fact that you want to relate customers to say invoices has ZERO and NOTHING to do with the fact that you have, or have not some invoice number. Why should a whole application break down and your relationships stop working because you don't have some silly invoice number? A invoice number has ZERO ZERO to do with some internal auto number. You might make invoice numbers required, but then again I worked with some systems in that the invoice information is entered, and until such time the invoice is approved, or actually sent out, the invoice number is blank until such time it is approved or sent out. Regardless of some business rules, and even if a invoice number is required, it has nothing to do with auto numbers and relationships you setup. Such relationships will work with, or without a invoice number.
The answer is you cannot and should not use auto numbers in Access for external meaning. There is simply no practical way to control the next number, and to control missing gaps.
Worse, it is HIGH unlikely that such invoice numbers will start at 1. And many companies adopt a system in which each invoice sent out to a given customer does NOT revel for example how many invoices were issued since the last one (this can give away valuable information to your customers).
If you need some incrementing invoice number?
Then YOU the developer have to build and setup a system based on your requirements.
So, I would think that this requirement is something more then just a number starting at 1, then 2, then 3 etc. And you VERY much want the ability in your application to set the next or starting invoice number.
There are as many ways to do this as there are flavors of ice cream. However, a typical and common approach is to setup a small table.
So create a table called tblNextInvoice.
It will look like this:
tblNextInvoice
ID: autonumber PK - you want one of these for all tables.
NextInvoice: long integer. - this is your next invoice number table.
This table will have ONE row. In the above table, simply enter into NextInvoice the next invoice number you want invoice numbers to start at.
Now, in the before update event of your form:
if isnull(me!InvoiceNumber) = True then
' about to save record - set the invoice number
me!InvoiceNumber = GetNextInvoiceNum()
End if
And you need to create a public function (placed in a standard code module - not the forms code module. It can look like this:
Public Function NextInvoice() as long
Dim myRST As Dao.Recordset
set myRST = Currentdb.OpenRecordSet("tblNextInvoice")
NextInovice = myRST!NextInvoiceNum
myRST.Edit
myRST!NextInvoiceNum = myRST!NextInoiceNum + 1
myRST.Update
myRST.Close
End Function
So, if you want to ensure no gaps, be able to set the the starting, and you want control over creating a invoice number?
Then you as a developer must setup, create, and design your invoice number system. Because the system is custom, then you can include say 01152020-00012 types of format (So this sample number has the month, date + a sequence number. You might even has a design and development meeting with your accounting people as to what kind of format and even government regulations are required for your invoice numbering system. So that custom get next invoice does not have to be limited to JUST a number - you can include some string values, and change that function (and invoicenumber) to a text type column as opposed to just a number type of column.
For example, I have some software running for volunteer groups, and some church groups - because of their non-profit status, there are now in place some government regulations as to the format of the invoice(s) issued. And this is especially for the case of receipts numbers issued.
When receipts are issued, then not only must the receipt show the new receipt number, but ALSO show that the receipt issued is a replacement for receipt XXXX has to be clearly marked (this is to prevent someone asking for a 2nd receipt of a donation, and submitting it two times for a double tax deduction. So, now you not even allowed to issue a receipt with the same number two times to a donor! (they must show a new number, and ALSO the number it is replacing).
So, regardless of these issues, in near all business systems, YOU the developer will need complete control over how such numbers re to be issued - and you can't leave this issue to chance, nor can you leave this issue to auto numbers either. This types of numbers are for business rules and business operations - they have nothing to do with using auto numbers to setup some relationships in a database - and relationships are 100% separate concepts from that of business things like invoice numbers, or receipt numbers etc.
Sql server doesn't increment anything if you abort insert operation or there is an error.
In ms access this is not true. Autoincrement does always increment and this is very annoying!
In sql server, if you start to write a new record and abort it, the identity increment doesn't increment. Same thing if you write a new record and cause an error of type data inserted.
In sql server autoincrement does increment if you have an external primary key related and you try to relate wrong id causing error.

Business Objects Complex prompt - how best to set up, using 4.0?

We're trying to create a template date prompt to be used across multiple universes, and also be used against multiple date fields (for instance, Transaction Date, Invoice Date, etc)
The prompt should display a list of values like the below (there's about 30 total):
Date Range START_DATE END_DATE
-------------------- ------------------------------ --------------
D: Yesterday 12/02/2015 12/03/2015
M: Month Before Last 10/01/2015 10/31/2015
M: Month to Date 12/01/2015 12/02/2015
Our initial attempt at this (creating a derived table, and then some aliases against the derived table, with one alias for each date type such as Transaction Date, Invoice Date, etc) was a failure - the sql generated is wrong, and includes the sql that's just supposed to provide the list of values. I think we need to use a different approach entirely.
Thanks for reading so far. I would greatly appreciate any ideas! Feel free to ask questions and I'll edit my notes to answer.
EDIT - we're using UNV (legacy Universe Design tool)
I'm going to assume you have an existing (dimension) table that contains a record for each date and the necessary columns to hold the different representations. You can also create a derived table for this.
Here are the steps to achieve what you described (sorry, no screenshots, this is off the top of my head):
Create the required dimension objects (based on your date table) in a separate class in the universe (you can hide this class at the end; the end user shouldn't see them).
Take one of the date dimension objects (e.g. Transaction Date, Invoice Date. …), enable the LOV option and edit it (which should bring up the query panel).
In the query panel, select all the dimension objects, created in step 1, that you want to show in your LOV. Important: the object holding the value to be returned, should be placed first in the query panel. Run the query (nothing will appear though).
Make sure that you enable the option to Export the LOV, otherwise your customisations will be lost upon exporting the universe. Optionally, enable the option to refresh the LOV each time the user calls it.
As you can't really define a single, reusable LOV in UDT that you can reference in different dimension objects, you'll have to perform this for each dimension object that you would want to have this LOV.
One way around this annoyance may to define the customised LOV once, note down the generated LOV name (about 8 alphanumeric characters long) and then replace the LOV name in the other dimensions with that LOV name. I'm can't guarantee that this will work though.
In contrast: with IDT you can define a customised LOV like this once (either in the Data Foundation Layer or the Business Layer), and then reference it as much as you want.

MS Access: Query Expression Error

I've got an access database to keep track of a number of awards to different people. They split the award by taking a given percentage (Yes, I realize the percents don't add up to 100, I'm just testing it right now). As of right now I have one column dedicated to calculating the first person's split of the prize money. However, I'd like to instead do this with a query instead.
I've created a query to total all of the awards received by a given person, starting with the first column for testing purposes. The query first gathers all the awards in which a given person has a share, then in a separate field multiplies the award by the percentage taken. However, after entering the person's name in the dialogue box, I get this error returned that says my expression isn't typed correctly.
I've tried several different things, from changing the formatting of the columns, to editing the expression in the final field where the calculation is done. I can't figure out why this is happening. Am I missing something obvious?

Microsoft Access - Scrambling Totals

I'm currently in the process of coding a summary report in Access XP for a client and while for the most part I've gotten 99% of the fields to match correctly with the original report (created in Corel Paradox 4.0), I'm having an issue with a sum field where despite using the same set of data, I'm getting invalid answers.
For example, in one table, the sum of the fee field comes to 9,050 in the Paradox report. In Access, the table containing the data also comes to that same amount. Despite this, when I enter the expression in my Summary report, Access will always display the total as 9,005.
I've been trying to use the NZ function to cancel any nulls, however that hasn't helped. Changing the number format to currency, general, and other formats also hasn't been helping.
Any assistance/insights are greatly appreciated.
EDIT: As requested below are some of the expressions from my Access report. Everything up till now has strictly been Access code, but as I have SQL experience, I am open to implementing that type of code if needed (it actually has been on my mind for a bit)
=nz(Sum([Fee]))
Calculates just the total fees
=nz(Sum([Room & Meals]))+(nz(Sum([Commutter & Meals])))+(nz(Sum([Fee])))
This we use to calculate the grand total. It also comes out identical to the fee total for my dummy data since the first two fields don't have any totals added to them.
Not sure this will help, but you need to break this down to trouble-shoot.
Capture the detail data from this report and compare to the Corel Paradox data. Don't just test the totals. Maybe you can put them in Excel.
Break out the three fields individually and sum those: Sum([Room & Meals, Sum([Commutter & Meals, Sum([Fee]). Don't format. Manually add them together to test.
Are these integers or is there some rounding going on?
Are the text boxes on the report large enough to display the entire number?
1 may show you're comparing apples to oranges.