Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3526 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted
set Field (Status):
Case (DayOfYear(Get(CurrentDate))  ≥  DayOfYear(::OutDate) xor DayOfYear(Get(CurrentDate)) < DayOfYear(::ReturnDate); "Inactive";"Active")

This is a line in my script that I setup for availability testing. However It's not working Correctly, the Case is not setting the status field right, Is this a case where I should use if instead?

Am I using the wrong operands?

I need it to Test the Current date (or any other Date, which  I was going to test later)

The intent is that if The Current Date is between X and Y X being the start of the end date and the day of first return, that it sets a person inactive.

For some reason, the only part that is functional is the part that copies the dates x and y to the parent table.

when it hits the case, it always returns inactive if return date has ANY date.

 

 

on a related question, If I wanted to Combine Date and time into a time stamp, do i use a calc field or use a script?

 

Also, what is the filemaker Equivalent of a Vlookup in excel? I need to perform this and It's become very annoying as LOOKUP seems to only return the first cell.

 

Posted

The intent is that if The Current Date is between X and Y X being the start of the end date and the day of first return, that it sets a person inactive.

 

I am afraid that's a rather confusing explanation. In general, to calculate if today is within a given range, you would do it this way =

 

Case ( RangeStart ≤ Get ( CurrentDate ) and  Get ( CurrentDate ) ≤ RangeEnd ; "In range" ; "Out of range" )

 

where RangeStart and RangeEnd are Date fields.  Not sure why you need a script for this - it seems like a calculation field should do just fine (make sure it's unstored, though). If this is for display only, you could even do without the field and just use some conditionally formatted text.

 

 

 

on a related question, If I wanted to Combine Date and time into a time stamp, do i use a calc field or use a script?

It's not really related. And it depends on why you need this. But probably a calculation field.

 

Also, what is the filemaker Equivalent of a Vlookup in excel? I need to perform this and It's become very annoying as LOOKUP seems to only return the first cell.

This one is not related all, and I suggest you start a new thread. Make sure you explain in more detail what you're after, as the above doesn't tell us that at all.

Posted

 

Also, what is the filemaker Equivalent of a Vlookup in excel? I need to perform this and It's become very annoying as LOOKUP seems to only return the first cell.

 

 

As Comment said: start a new thread on this because it speaks to the fundamental understanding of how FM works.

When you start that new thread; be very clear what your setup is and what you are after, don't make it abstract.

This topic is 3526 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.