Need Help Creating Workflow Template

Iโ€™ve got a gSheet that contains a database of orders. In this table I have the column [Status]. Whenever [Status] contains the value โ€œAVAILABLEโ€, i want to bring all of the orders that are AVAILABLE and contain only the columns [Pickup], [Delivery], [Farm], [Customer], and [Rate] to the gDoc so that I can attach it to a Workflow.

Basically Iโ€™m wanting my gDoc template to contain a 5 column table, showing all AVAILABLE orders in my system.

This is what I have so farโ€ฆ

<<If: [Status] = โ€œAVAILABLEโ€>>

Pickup: <<LIST([Pickup])>>

<>

Solved Solved
0 8 654
1 ACCEPTED SOLUTION

Try this:

<<Start: FILTER(Orders, [Status] = โ€œAVAILABLEโ€)>>
Pickup: <<[Pickup]>>
Delivery: <<[Delivery]>>
Farm: <<[Farm]>>
Customer: <<[Customer]>>
Rate: <<[Rate]>>
<< End >>

View solution in original post

8 REPLIES 8

Try this:

<<Start: FILTER(Orders, [Status] = โ€œAVAILABLEโ€)>>
Pickup: <<[Pickup]>>
Delivery: <<[Delivery]>>
Farm: <<[Farm]>>
Customer: <<[Customer]>>
Rate: <<[Rate]>>
<< End >>

Thanks Phil, that did the trick!

Glad it worked for you.

How can I sort the results to show the [Pickup] column in Ascending order?

<<Start: FILTER(Orders, AND([Status] = โ€œAvailableโ€,[Pickup]>=TODAY(),[Pickup]<=TODAY()+2 ))>>

<<[Order #]>> <<[Pickup]>> <<[Delivery]>> <<[Appt]>> <<[Customer]>>

<< End >>

Wrap your FILTER() expression with ORDERBY():

ORDERBY(FILTER(...), [Pickup])

Iโ€™ve almost got this thing put together, just struggling on the last step which is using SPLIT() to remove the first two digits โ€œ19โ€ in front of the 19xxxx Ref number. For some reason I keep getting a comma as a result, and I canโ€™t figure it out. Any ideas?

The Ref column is my Key so I used this Start Expression:

<<Start: ORDERBY(FILTER(Orders, AND([Status] = โ€œAvailableโ€,[Pickup]>=TODAY(),[Pickup]<=TODAY()+2 )),[Pickup])>><<SPLIT([Order #],โ€19โ€)>>

If all of the Order# are the same length, you can use the Right function to get the rightmost N characters of the Order#.

If not, you can use the expression SUBSTITUTE(Order#, Left(Order#,2),"")

The RIGHT() function did the trick, much appreciated.

Top Labels in this Space