cancel
Showing results for 
Search instead for 
Did you mean: 

last in sequence

steverdan
Participant
0 Kudos

So, I am looking to find the status of the final operation of an order. We have a field called sequence which is a numerical value and has no set limitations, so the op I am looking for can be 5 or 25. So how can I formulate this for the sequence to be the final (highest number) sequence and if the status is complete?

DellSC
Active Contributor
0 Kudos

I can think of a couple of ways to go about this, depending on what you're trying to do. Do you need this to filter the data or just to show the specific info in the report?

steverdan
Participant
0 Kudos

Just display the answer on the report.

So what I want it to look like is job # 123456 (final operation) complete

this can also work as a true false statement since I will be suppressing anything that is not complete.

0 Kudos

what product are you using?

steverdan
Participant
0 Kudos

CR 2020

Accepted Solutions (0)

Answers (4)

Answers (4)

ido_millet
Active Contributor
0 Kudos

Tough to understand what you are trying to communicate.
But my guess is that you might be using that expression to filter the report (record selection formula). That would result in removing all the other cases from the report!

Instead, you need to simply create a regular formula that returns the Status for a record. Place that formula in the Group Footer.

steverdan
Participant
0 Kudos

sample-data.xml

sample data attached.

So looking at this job (all data from same job) you will notice that the final step is packing or operation service # 1506. You will also notice that the status is C for complete. Inside operation is True. So what I want is for the report to look for the 1506 (always the last operation) and see that it is an internal operation, and then see that the status is complete. I want it to then put on the report that the requirements are true. Hope this helps. Most return the correct data (at least that is the way it appears) when I let it list them out and I get a line for every operation. If I shorten it to the grouping heading, I get one line, but it is false even when it meets the requirements. My thought is that it is only reading the first operation, but I may be assuming too much.

ido_millet
Active Contributor
0 Kudos

Isolate the problem by testing each part of the composite logical condition on its own.

In other words, identify which of the three conditions is failing to return what you expect it to return.

steverdan
Participant
0 Kudos

the first argument sorta works. It actually knocked out one order on the first page that should be on the report, but the ones thaty are on there are showing correctly. After that, it gets worse.

ido_millet
Active Contributor
0 Kudos

Most likely you are either sorting incorrectly or your logic for the Complete status formula is wrong.

Place both the numeric value as well as the status formula in the group footer. What do they show? What do you expect them to show? And what is the formula expression?

steverdan
Participant
0 Kudos

This is the formula I am using

{Job_Operation.Operation_Service} like ["1505", "1506"] and {Job_Operation.Inside_Oper} = yes and {Job_Operation.Status} like ["COMPLETE", "STARTED"]

This doesn't mean I am stuck to a true/false statement, I just went with that. What I am getting is everything shows false. When I let it breakdown for each op, i get the same thing. So for every operation it is saying (if I am understanding what I formulated) is that these are not the packing operations I am looking for or that they are and just aren't complete. Either way, I should have some true results.

Not sure how to do the numeric value since it pulls multiple ops.

ido_millet
Active Contributor
0 Kudos

Group by Order. Sort by Sequence.

Show the information you need in the Group Footer.
Suppress the detail section.

The Group Footer shows the information for the last record within the group.

steverdan
Participant
0 Kudos

Yes it does eliminate the multiple line entries, but that gets me no closer to getting the correct answers on the data in question. It is still showing false on the completed when in fact some of these are true.