In Pentaho Report Designer 5.0.1, I wish to display a message-field as follows:
Expired 12 JUN 2014
So I set up the value of the message-field as:
Expired $(date_expired,date,dd MMM yy)
The message-field should be displayed if the record has a date_expired value, and nothing at all if the date_expired is null. Currently the message-field displays
Expired
even when the field is null.
So based on the value of date_expired, the message-field must display or not.
Assistance is highly appreciated. Thanx
select that message box, and then Structure -> Attributes -> value, and then type the following formula:
=IF(ISNA([date_expired]);"";"Expired "&TEXT([date_expired];"dd MMM yyyy"))
You can also setup the 'visible' under Structure -> Style -> visible and then use the following formula:
=NOT(ISNA([date_expired]))
Related
I'm using a DateTimePicker with vaadin flow 23.0.5.
The problem is that if a user only enters either the date or time (but not both), then when I save the field using a binder the result is a null LocalDateTime.
import com.vaadin.flow.component.datetimepicker.DateTimePicker;
private DateTimePicker noticeTwoDateTime;
noticeTwoDateTime = new DateTimePicker(label);
layout.add(field);
binder.forField(this.noticeTwoDateTime).bind(
NoticeTemplate::getNoticeDateTwo,
NoticeTemplate::setNoticeDateTwo);
Is there some way to warn the user that they must enter both?
I've explored using a validator but it only gets passed the LocalDateTime which of course is null.
First of all you can use a helper text as described here:
https://vaadin.com/docs/latest/ds/components/date-time-picker/#providing-input-guidance
And if that's not enough you can try to create your own validation routine and use it within the binder as e.g. here:
https://vaadin.com/docs/latest/flow/binding-data/components-binder-validation/#defining-validators
Could look similar to this then:
myDateTimeBinding = binder.forField(myDateTimePicker)
.withValidator(myDateTime -> Validation.validateDateTime(atdDateTimePicker.getValue()),
"Please pick Date and Time")
.bind(......
with Validation as your Validation Utils Class and validateDateTime as your method returning a boolean.
Workaround: If you mark the field as being required/mandatory then the DateTimePicker shows an error message, if one of both is missing.
Yeah sure, you don't want mark every date/time as required....
This problem seems to have existed already in Vaadin 14: Vaadin 14 DateTimePicker with optional time or warning for missing time
I am attempting to create a link in an APEX (Oracle) chart which will open an interactive report page by using the "Link Builder -Target" wizard.
Link Builder -Target Dialog]1
Unfortunately the link is passing the column name (bob) rather than it's value:
https://xxxxxxxxx.xxxx.xxx:xxxx/ords/f?p=100:51:19910173095277::NO:RP,51:P51_TARGET_FIELD:#BOB#
If I substitute a value for #BOB#, the interactive page opens properly.
How do I get APEX to pass the column value rather than the column name to the linked page?
Is BOB a chart column?
If not in the Link Builder, use the selector on 'Value' to select the corresponding column from the chart, such as #NAME#.
Regards,
David
Page Designer vs Legacy Component View
Apex 5.0 still using anychart charts, but using Page Designer the query of the chart is not validate. If you change to Legacy Component View you must see a error on save the chart with this query.
The selects in anychart charts need a query following these terms:
*BOB column is not valid to use on Link Builder Target
Try to put the value of the BOB column in the LINK column, like:
SELECT
bob AS LINK,
or use APEX_UTIL.PREPARE_URL, in this case it's not necessary to use Link Builder Target.
...
The query needs only three columns called LINK, LABEL and VALUE. Use alias to make this.
SELECT
APEX_UTIL.PREPARE_URL
('f?p=&APP_ID.:14:&APP_SESSION.::::P14_RECIEVER,P14_VALUE:' || bob || ',' || quantity) AS LINK,
month AS LABEL,
quantity AS VALUE
FROM mytable
https://apex.oracle.com/pls/apex/f?p=4550
Workspace: STACKQUESTIONS
User: test
Password: test
Issue page: https://apex.oracle.com/pls/apex/f?p=145797:10
I have one field :P2_DATE, datepicker on an interactive report in apex5.0.
First Question:
How can i create validation thru:
1. A dynamic action
2. A validation process
that gives an error msg: 'Date should not be greater than system date'
when user choose from datepicker.
Second Question:
How to show only today's date in the date picker and disable others dates.
Pls provide steps-by-steps instruction if possible...thxs!!
Add Validation
Set type to PL/SQL Expression and put:
to_date(:P2_DATE,'DD-MM-YYYY') = to_date(sysdate,'DD-MM-YYYY')
You can see this Answer:jQuery Date Picker - disable past dates for disable dates in datepicker but you already have control over date by validation.
Another way is to create custom datepicker from external plugin.
The title is self explanatory. I am having difficulties setting a string value to a date time widget.
XCP has a build in function stringToDate
which i use in these examples...
1. stringToDate('5-5-2009')
2. stringToDate('05-05-2009')
3. stringToDate('5/5/2009')
But non of them work. What am I missing here ?
Also i set the value of the widget in the behaviors tab of the date widget.
If you are talking about Date-Time Input widget then you need to use dateToString not stringToDate.
I figured out the issue. It's dependent to the format in which you save your date to string value. If we save the Date-Time Input widget value in this format:
dateToString('12-12-2018', 'm-d-Y')
then doing a :
stringToDate(savedvalue) will work only when the format saved was 'm-d-Y'. It wasn't working before because i saved it as 'd-m-Y'.
I am attempting to take status off of a task by setting the task.stop field to an earlier date using vba. I am getting a "Runtime Error 1101: The argument is not valid."
I have tried the following two lines of code:
Task.Stop = CurrentProj.StatusDate
and
Task.SetField FieldID:=pjTaskStop, Value:=CurrentProj.StatusDate
Current values are:
CurrentProj.StatusDate = 10/31/2013 17:00:00
Task.Stop = 11/5/2013 17:00:00
both are of Variant/Date DataType
I could not find and use of the Stop field in any forums. Thanks for any help you can provide.
The "Split in Progress Tasks" option must be selected or the Stop field will be read only. File>Options>Schedule>Scheduling options for this project>Split in progress tasks. Checking that box solved the problem.