?
Solved

using the @Adjust command

Posted on 2005-03-01
8
Medium Priority
?
320 Views
Last Modified: 2013-12-18
Hi! experts
I have a view named amla with the ff: columns

date of report value is dcol
status value is stat
branch value is branch

I also have an action button to send the data or record to Head Office.  The action button have the formula below:

FIELD Flag := Flag;
FIELD by := by;
@If(@Today >= @Adjust(dcol; 0; 0; 13; 0; 0; 0);@Failure( "The check date must be between 3 days from date received and not dated one year from date received." ); Flag = "No" & by != "";
@Do(@Prompt([OK];"@mailsend dapat dito");
@SetField("Flag"; "Yes");@Prompt([OK];"AMLA";"CSV File Sent"));Flag = "Yes"; @Prompt([OK];"AMLA";"CSV File Already Sent");@Prompt([OK];"Error";"Double click the newly created document and enter Reported by field." ))

What I want is that before sending it will check the dcol field versus the date today, if it is more than 13 days ..it will not send the record and prompt the user that the data is more than 13 days ....need help thanks guys!
0
Comment
Question by:emem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 13436566
Try this:

FIELD Flag := Flag;
FIELD by := by;
FIELD dcol:=dcol;
@If(@Today >= @Adjust(dcol; 0; 0; 13; 0; 0; 0);@Return(@Prompt([OK];"cannot send"; "The check date must be between 13 days from date received and not dated one year from date received." )); @If(Flag = "No" & by != "";
@Do(@Prompt([OK];"@mailsend dapat dito");
@SetField("Flag"; "Yes");@Prompt([OK];"AMLA";"CSV File Sent"));Flag = "Yes"; @Prompt([OK];"AMLA";"CSV File Already Sent");@Prompt([OK];"Error";"Double click the newly created document and enter Reported by field." )))
0
 

Author Comment

by:emem
ID: 13436859
ok ill try this ....ur such a big help and the other experts as well ...get back to you soon....
0
 

Author Comment

by:emem
ID: 13436919
madheeswar got this error "Incorrect data type for operatoror @ function: Time/Date expected"....dcol is in date format how come? if not in date format how can i convert text to date is there a way?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:madheeswar
ID: 13436954
@TextToTime(dcol)

or use:
@textToTime(@text(dcol))

this may happen in @Adjust function and replace dcol with the above where ever necesary. Do it one after another.
0
 

Author Comment

by:emem
ID: 13437037
ok ill try this thanks again
0
 

Author Comment

by:emem
ID: 13445965
madheeswar.....i still encountered the error "Incorrect data type for operatoror @ function: Time/Date expected" how come?

FIELD Flag := Flag;
FIELD by := by;
FIELD dcol :=@texttotime(dcol);
@If(@Today >= @Adjust(dcol; 0; 0; 13; 0; 0; 0) & @Today >=@Adjust(dcol; 0; 0; 1; 0; 0; 0);@Return(@Prompt([OK];"Cannot send"; "Cannot Send CSV Files more than 10 days from Date of Report.  Manually Send your files to Compliance Office" )); "";@Today < @Adjust(dcol; 0; 0; 13; 0; 0; 0) & @Today >@Adjust(dcol; 0; 0; 1; 0; 0; 0);@Prompt([OK];"Sent"; "Sent CSV Files to late archive" ;
@If(Flag = "No" & by != "";
@Do(@Prompt([OK];"@mailsend dapat dito");
@SetField("Flag"; "Yes");@Prompt([OK];"AMLA";"CSV File Sent"));Flag = "Yes"; @Prompt([OK];"AMLA";"CSV File Already Sent");@Prompt([OK];"Error";"Double click the newly created document and enter Reported by field." ))))
0
 

Author Comment

by:emem
ID: 13446937
i have also notice that the first time it will work but the next time it will display the error msg ...
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 200 total points
ID: 13447718
Thats why try step by step:
First create Button: test Date
in that :
FIELD dcol:=dcol;
res:=@Adjust(dcol;0;0;13;0;0;0);
@Prompt([OK];"Result";@text(res))

Like this debug the code line by line. U wil get the result. Try with different docs and different scenarios.

Hope it sheds some light.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

800 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