Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Boa noite galera, tudo bem?
Estou com uma dúvida e gostaria de pedir a ajuda de vocês.
Preciso desenvolver uma função que altere o fundo da tabela com os seguintes requisitos
Se a comparação da 'Data de solicitação' com a 'Data de entrada da NF' for igual ou menor a 3 dias = cor verde
Se a comparação da 'Data de solicitação' com a 'Data de entrada da NF' for maior que 3 dias = cor amarela
Se a comparação da 'Data de solicitação' for maior que a ' Data de entrada da NF' = cor vermelha
Estou tentando a seguinte função mas as cores não estão corretas
IF (Data entrada NF <= Data de solicitacao -3 , 'green',
IF (Data entrada NF >= Data de solicitacao +3, 'yellow',
IF (Data de solicitacao > Data entrada NF, 'red')))
Hello,
If my understanding is correct, you have 2 fields (Data entrada NF and Data de solicitacao). Then you want to achieve the following:
Perhaps you can try using the following expression:
if (
[Data de solicitacao] > [Data entrada NF],
Red(),
If(
[Data de solicitacao] <= [Data entrada NF] and [Data de solicitacao] >= Date([Data entrada NF] - 3, 'MM/DD/YYYY'),
Green(),
Yellow()
),
)
Here is my outcome:
I have added another column to calculate the differences of the dates with the expression: =[Data entrada NF] - [Data de solicitacao]. If the difference is a negative number, then [Data de solicitacao] is grater than [Data entrada NF], so the color should be RED. If the difference is a positive number 1, 2 or 3, then the color should be GREEN. Otherwise if the positive number is grater than 3, then the color should be YELLOW.
As you can see:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.
Hello,
If my understanding is correct, you have 2 fields (Data entrada NF and Data de solicitacao). Then you want to achieve the following:
Perhaps you can try using the following expression:
if (
[Data de solicitacao] > [Data entrada NF],
Red(),
If(
[Data de solicitacao] <= [Data entrada NF] and [Data de solicitacao] >= Date([Data entrada NF] - 3, 'MM/DD/YYYY'),
Green(),
Yellow()
),
)
Here is my outcome:
I have added another column to calculate the differences of the dates with the expression: =[Data entrada NF] - [Data de solicitacao]. If the difference is a negative number, then [Data de solicitacao] is grater than [Data entrada NF], so the color should be RED. If the difference is a positive number 1, 2 or 3, then the color should be GREEN. Otherwise if the positive number is grater than 3, then the color should be YELLOW.
As you can see:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.
Muito obrigado meu amigo, resolveu meu problema.