Skip to main content

16 replies

venkatrea696188
Inspiring
Apr 3, 2024 8:52 AM UTC

We need more details about your expected output

mk0724
mk0724Author
Known Participant
Apr 3, 2024 8:59 AM UTC

I have a list of deals which are created and have a field known as closing date while closing the deal.

When i closed a deal it should get reflected in other grid based on the quarter.

The quarters are divided based on Jan to mar, apr to jun, jul to aug, and oct to dec.

The grid should show case the deals  based on the quarter in current year.

venkatrea696188
Inspiring
Apr 3, 2024 9:08 AM UTC

Write a Decision rule or Multiple If statements. Use Month Function to get the month of CloseDate.

 


month(ri!closeDate)

The grid should show case the deals  based on the quarter in current year

What do you mean by this You want to Query it from Database based on quarter or You want to just manipulate Queried Data?

vishala6464
Participating Frequently
Apr 3, 2024 9:32 AM UTC

You can try this---

if(
or(
month(todate(ri!date)) = 1,
month(todate(ri!date)) = 2,
month(todate(ri!date)) = 3,
),
"Jan-Mar",
if(
or(
month(todate(ri!date)) = 4,
month(todate(ri!date)) = 5,
month(todate(ri!date)) = 6,
),
"Apr-June",
if(
or(
month(todate(ri!date)) = 7,
month(todate(ri!date)) = 8,
month(todate(ri!date)) = 9,
),
"July-Sep",
"Oct-Dec"
)
)
)

harshitb6843
Brainy
Apr 3, 2024 9:33 AM UTC

For improved readability. 

vishala6464
Participating Frequently
Apr 3, 2024 10:43 AM UTC

you can do like this by using custom record fields in record type

davidj137213
Brainy
Apr 3, 2024 10:25 PM UTC

Use this

  trunc((month(local!date) /3),0)  +1

mathieud0001
Genius
Apr 4, 2024 12:10 AM UTC

This type of expression is a little more flexible as it will work for non-standard quarters (i.e. Jan-Mar = Q4)

a!match(
  value: month(ri!date),
  whenTrue: fv!value <= 3,
  then: 4,
  whenTrue: fv!value <= 6,
  then: 1,
  whenTrue: fv!value <= 9,
  then: 2,
  default: 3
)

You can also replicate this logic in a Custom Record Field using https://docs.appian.com/suite/help/24.1/fnc_crf_customfieldmatch.html

marioo5689
New Participant
Apr 4, 2024 7:48 PM UTC

HI, if you want to devide the "Year" In "Quarters" based on "Dates", here is the way to do it: 

if(
  isnull(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate']),
  null,
  /* Quarter: Concatenate Q and the quarter number */
  "Q" & floor((month(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])-1)/3) + 1
  /* Year: Concatenate year */
  & " " & year(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])
)

INPUT VALUES: 

OUTPUT: