[Question] Split ticket based on Positions

Ahh okay.

[:LoopValue] and [:Name]

So can I use SeatPosition=[:LoopValue]

Give it a go.
If not just the loop value (so long as you don’t have any other order states using numbers in same range it will work without specifying state I expect.
You obviously want a loop name constraint on the rule itself to only trigger on your position loop value action.

This is great. Im learning so much about looping values right now.

I have one minor issue that I think as soon as I solve, part of my setup will work.

From my understand the value looper is not looping through the SeatPosition values properly. See how all positions are showing under the same popup for [:LoopValue] tag. Thats causing my setup to not work because its reading all those numbers as one value when it should be looping each one individually. Any ideas what im doing wrong?

Think loop value needs comma seperated list, you need to add a formatting section into the report expression, it goes on the end after a colon like :{0},
Have a look at some sample reports to see the correct expression to generate comma list.

2 Likes

Okay I got that to work. When I move orders, I want to come back to original ticket. Is Display Ticket action good enough or do I need to Load Ticket also? Whats the difference between the two?

Also for some reason its only splitting one position at a time? My guess is that Value Looped action is firing faster then move and display ticket and thats messing it up?

Use load ticket not display ticket if you want to automate it.

1 Like

Okay thanks, trying it now.
Whats the difference if you dont mind me asking? Just so I know for future purposes.
All I need to give Load Ticket action is the ticket id right? I dont need to worry about Ticket Uid or anything else?

Hmmm. Its now all automated and everything is splitting but its crashing samba with the following message:

Admin said “”

[Exception Info 1]

Top-level Exception
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Inner Exception 1
Type: System.ObjectDisposedException
Message: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.
Source: EntityFramework
Stack Trace: at System.Data.Entity.Core.Objects.ObjectContext.get_Connection()
at System.Data.Entity.Core.Objects.ObjectQuery1.GetResults(Nullable1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery1.Execute(MergeOption mergeOption) at System.Data.Entity.Core.Objects.DataClasses.EntityCollection1.Load(List1 collection, MergeOption mergeOption) at System.Data.Entity.Core.Objects.DataClasses.EntityCollection1.Load(MergeOption mergeOption)
at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.DeferredLoad()
at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.LoadProperty[TItem](TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject)
at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.<>c__DisplayClass72.<GetInterceptorDelegate>b__1(TProxy proxy, TItem item) at System.Data.Entity.DynamicProxies.Ticket_7F760E3EEF88C685146460E9F85E67EC29DC36AB51C2CAA67D6548789ED5FC17.get_TicketEntities() at Samba.Modules.PosModule.TicketNotesViewModel.Refresh() at Samba.Modules.PosModule.TicketNotesViewModel.OnTicketEvent(EventParameters1 obj)
at Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument)
at Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments) at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments) at Microsoft.Practices.Prism.Events.CompositePresentationEvent1.Publish(TPayload payload)
at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)


Load ticket is if you want to do automation on the ticket… display ticket is when you need to see it in the ticket screen to do operations on it manually.

Do you know of a way I can write report string to get the total count for all these as an output? I want to assign the number 4 to a setting. I have a feeling its crashing because value looping is not stoping properly so I want to only run rule when [:LoopValue] <= 4

You can see where it stops with Show Message action.

Great fixed it. Had to move Load Ticket action to first position in rule.
Wow I cant believe I figured this all out in under 4 hours. Im learning so much everytime I take on a new project.Ill create a tutorial for everyone that wants to use this.

Do you know how to use the Display Ticket List action. After all my positions are split I want to show Ticket List Screen where all the tickets are showing for that table? I have tried using the action but no luck. For example I tried inputing the entity 24 which is the table with all tickets and it just goes to main tables entity screen.

2 Likes