The CreatorCon Call for Content is officially open! Get started here.

Flow designer look up action based on date does not return the expected result

mfhaciahmetoglu
Mega Sage

Hey all,

 

I need to look up on hardware assets records where

- Asset function == primary

- Warranty Expiration == today + 2 months (this is a custom field of Date type).

 

I set up the flow on Flow Designer:

1. Set the flow variable to 2 months from now:

mfhaciahmetoglu_0-1741708900094.png

2. Look up records:

mfhaciahmetoglu_1-1741708923890.png

All looks fine.

I have a record that meets the conditions: 

mfhaciahmetoglu_2-1741708975748.png

I run a test. The variable is set correctly:

mfhaciahmetoglu_3-1741709018946.png

The lookup is run okay:

mfhaciahmetoglu_4-1741709036790.png

 

However, as you can see, the record is not returned.

 

When I set the filter before or after, it does not work either.

 

Any one has any idea why?

 

I tried to write a script to see what happens.

 

var gdt = new GlideDate();
gdt.addMonthsLocalTime(2);

var gd = new GlideRecord('alm_hardware');
gd.addEncodedQuery('asset_function=primary^u_glide_date_1ONgdt;');
gd.query();
while (gd.next()) {
  gs.addInfoMessage(gd.getValue('asset_tag'));
}

 

This script returns all records.

 

So, something seems to be wrong but I don't know why.

 

Any ideas?

 

Thanks.

 

Best,

Firat

 

 

6 REPLIES 6

@Ankur Bawiskar 

I am not sure if I understood it correctly?

mfhaciahmetoglu
Mega Sage

Hi all,

 

It is interesting that if I open another if statement and do the comparison there it works just fine.

 

It is just not working on the look up conditions.

 

Best,

Firat