emem
asked on
using the @Adjust command
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];"@mailsen d 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!
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];"@mailsen
@SetField("Flag"; "Yes");@Prompt([OK];"AMLA"
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!
ASKER
ok ill try this ....ur such a big help and the other experts as well ...get back to you soon....
ASKER
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?
@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.
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.
ASKER
ok ill try this thanks again
ASKER
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];"C annot 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];"@mailsen d 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." ))))
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];"C
@If(Flag = "No" & by != "";
@Do(@Prompt([OK];"@mailsen
@SetField("Flag"; "Yes");@Prompt([OK];"AMLA"
ASKER
i have also notice that the first time it will work but the next time it will display the error msg ...
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
FIELD Flag := Flag;
FIELD by := by;
FIELD dcol:=dcol;
@If(@Today >= @Adjust(dcol; 0; 0; 13; 0; 0; 0);@Return(@Prompt([OK];"c
@Do(@Prompt([OK];"@mailsen
@SetField("Flag"; "Yes");@Prompt([OK];"AMLA"