Skip to main content

I have a GI that I am building that will allow me to show all sales orders our Powdercoating warehouse team need to work on.

Many of our sales orders come with a lead time that is quite far in the future (eg, the material is not needed until the end of the month) but others need to be shipped urgently. We use the “Requested On Date” (renamed in my GI to “PC DUE DATE” to measure DIFOT, and I have added a “PC Scheduled Date” attribute that I have connected to the Sales Order UDF so that production planners can put a date that they want the team to prepare this order. I want to be able to have a combo box at the top of my GI that says “Painting Today” or something like this, but  cannot seem to make it work. 

 

so for example, the production planner would select “Painting Today” (A) and if the Schedule Date (B) was in the same day as today, then only these records would show. 

 

 

Hi @DanielStarke  Can you please review my understanding and confirm?

Simply, when we select the “Painting Today” on the top then we need to look into the “schedule Date” and populate the records, which are equal to today’s date right?

if yes, can you please share the XML format of GI here


Yes perfect @Naveen B .

 

basically in the physical workflow there are two teams, pickers and painters. the pickers are always preparing the material for the painters to work on tomorrow. so we just need “Painting Today” and “Painting Tomorrow” as drop downs and the teams can the focus on what they need to work on


Hi @DanielStarke  I just worked on it and working for me.

Please add the below condition so that records will be populated based on the selection criteria on the top.

Here is the formula

=IIF((TimeDuration] = 'P1', Today(), IIF((TimeDuration] = 'P2', DateAdd( Today(), 'd', 1), IIF((TimeDuration] = 'W1', DateAdd( Today(), 'd', 7), DateAdd( Today(), 'd', 14) )))

 

 


excellent @Naveen B - works perfect other than the part for next week and this week - i wondered if these should be a range somehow? also it would be nice if it showed all until a selection was made in the combo box. would the switch function be better than nested iffs?

 

=Switch( (TimeDuration] = 'P1', DateAdd( Today(), 'd', 0.5), ,TimeDuration] = 'P2', DateAdd( Today(), 'd', 1.5), ,TimeDuration] = 'W1', DateAdd( Today(), 'd', 7.5), DateAdd( Today(), 'd', 14.5) , '*') 


i tried to add a wildcard as the closing else but the syntax must not be right


@Naveen B , my subsequent question is linked to this as in I wondered if it would be simpler to have a number of days since the schedule date and then filter against that value for the ranges, rather than use combo box parameters


Hi @DanielStarke  Yeah, switch case is also very simple and here is sample for your reference.

 


Switch( (TimeDuration] = 'P1', DateAdd( Today(), 'd', 0.5), ,TimeDuration] = 'P2', DateAdd( Today(), 'd', 1.5), ,TimeDuration] = 'W1', DateAdd( Today(), 'd', 7.5), ,TimeDuration] = 'W2', DateAdd( Today(), 'd', 14.5)) 
 


Reply