Solved

Insert a calculated Field between "  "

Posted on 2011-02-25
6
407 Views
Last Modified: 2012-05-11
Hi
I need have a calculated field inserted to form part of the result of the text .
IE.I need to have the result read..."Contract Due to expire in 4 (Days left before Contract Expires)Days"
The example below not giving me this .The Function works without the GeatasText(Days..etc
Case (IsEmpty ( Contract Start  Date )or IsEmpty ( Contract end Date );"";
Days Left before contract Expires<10;"Contract Due to Expire in;(GetasText(Days Left before contract Expires))";
)
Thanks
0
Comment
Question by:Krisraychris
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

by:North2Alaska
ID: 34981162
Try this:
Let (
  [
    ~NumDays = Get ( CurrentDate ) - ( Get ( CurrentDate ) - 4 ) ;   // Replace with Contract end Date
    ~Unit = If ( ~NumDays = 0 or ~NumDays > 1 ; " Days" ; " Day" )
  ];
  Case (
    // IsEmpty ( Contract end Date ) ; ""
    ~NumDays < 10 ; "Contract Due to Expire in " & ~NumDays & ~Unit ;
    ""
  )
)

It will produce:  Contract Due to Expire in 4 Days
0
 
LVL 12

Expert Comment

by:North2Alaska
ID: 34981186
I forgot to mention to change ( Get ( CurrentDate ) - 4 ) to Contract end Date and to remove the // in the case statement.
0
 

Author Comment

by:Krisraychris
ID: 35004415
Thanks for your reply.
I have made some changes to your idea and it looks ok for now.I woudl be pleased to know if you think this is ok.

Case(  Contract end Date-Get(CurrentDate)>=0;Contract end Date-Get(CurrentDate);Contract end Date-Get(CurrentDate)<0;"")

Let (
  [
    ~NumDays =    Days Left before contract Expires;    
    ~Unit = If ( ~NumDays = 0 or ~NumDays > 1 ; " Days" ; " Day" )
  ];
  Case (IsEmpty ( Contract Start  Date )or IsEmpty ( Contract end Date )
      ; "";
    (~NumDays < 10)  and (~NumDays >1) ; "Contract Due to Expire in " & ~NumDays & ~Unit ;
   
   ~NumDays >=10 ; "Contract Active" ;~NumDays =0 ; "Contract Expired " ;""))
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:Krisraychris
ID: 35004432
DaysLeftBeforeContractExpires :
Case(  Contract end Date-Get(CurrentDate)>=0;Contract end Date-Get(CurrentDate);Contract end Date-Get(CurrentDate)<0;"")

AlertToRenew:Let (
  [
    ~NumDays =    Days Left before contract Expires;    
    ~Unit = If ( ~NumDays = 0 or ~NumDays > 1 ; " Days" ; " Day" )
  ];
  Case (IsEmpty ( Contract Start  Date )or IsEmpty ( Contract end Date )
      ; "";
    (~NumDays < 10)  and (~NumDays >1) ; "Contract Due to Expire in " & ~NumDays & ~Unit ;
   
   ~NumDays >=10 ; "Contract Active" ;~NumDays =0 ; "Contract Expired " ;""))
0
 
LVL 12

Accepted Solution

by:
North2Alaska earned 500 total points
ID: 35005841
Looks good.  The only thing you might consider is the condition for "Contract Expired".  You may want to change "~NumDays =0" to "~NumDays <= 0".  The thinking is once the  number of days until the contract expires goes to zero or negative it should always read "Contract Expired " 
0
 

Author Comment

by:Krisraychris
ID: 35006292
Perfect...Thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mysql ODBC Drivers for Mac 2 937
Printing Portal records 15 140
FileMaker 13 Server visible to client machines but no database files listed 5 98
Airport Extreme 802.11ac 15 82
Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now