Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
- In my sheet i've four inputboxes. First 2 inputboxes are able to choose date and time and when i click the button the applicaton holds data with in the range.
- Now, i want to hold one field value in 3rd inputbox. But the input box not able to hold it, for eg as shown in the below image of 2nd textobject value should hold in 3rd inutbox.
- In button action itself i written for the variable to hold this value.
For your reference i'm attaching my qvw file.
swuehl,
Actually i didn't see your previous post and replied.But after use the latest expression, the corresponding lot is getting.
But i can't undestand the expression.
Can you please explain a bit detailed.If you do like that i may know what you had done.
Once again thanks for your reply.
Sure,
=timestamp(Min({<CaptureDateTime={">=$(=vStartDate& ' ' & vStartTime)<=$(=vEndDate & ' ' & vEndTime)"} >} LotStartDateTime),'MM-DD-YYYY hh:mm:ss')
& '('& FieldValue('LotNo',FieldIndex('LotStartDateTime',Min({<CaptureDateTime={">=$(=vStartDate& ' ' & vStartTime)<=$(=vEndDate & ' ' & vEndTime)"} >} LotStartDateTime))) &')'
has two parts, first builds the timestamp string:
timestamp(Min({<CaptureDateTime={">=$(=vStartDate& ' ' & vStartTime)<=$(=vEndDate & ' ' & vEndTime)"} >} LotStartDateTime),'MM-DD-YYYY hh:mm:ss')
(I think this should be clear, finding the min LotStartDate using a set expression to limit on certain CaptureDateTimes, then formatting).
Second part
& '('& FieldValue('LotNo',FieldIndex('LotStartDateTime',Min({<CaptureDateTime={">=$(=vStartDate& ' ' & vStartTime)<=$(=vEndDate & ' ' & vEndTime)"} >} LotStartDateTime))) &')'
is doing a lookup of the LotNo directly in your fields, I am using FieldIndex('Fieldname',Fieldvalue) to retrieve the index of the just found minimum LotStartDateTime (and hopefully QV will optimize the min search, because it's already performed once) and then input this to the FieldValue('FieldName',Index) function as second parameter.
The rest is just adding brackets around.
Hope this makes it clear,
Stefan
Swuehl,
Sorry for disturbing you again on the same post.
Please see the attached file
I have changed the data and it is not showing correct results as it is working with previous data.
Can you find what happened?
Thanks...
I can't see any contained data in your qvw (no tables successfully loaded?)
Please check your load. You got two FROM statements in your load. I get an error message.
Ok Swuehl
This time you will found the correct attachment
Thanks
Thanks a lot swuehl I'll try and get back to you.
Your capture date time is not formatted like 'MM-DD-YYYY hh:mm:ss' ,the format you used before and is used in the actions to select on field and in set expression.
Either format your field on load or change your action expressions.
Regards,
Stefan
Ok Swuehl,
Now how can i made that correct.
Do you have any suggestions?
Thanks..
As already said (now I focus in formatting in load):
RangeData:
LOAD
timestamp(CaptureDateTime,'MM-DD-YYYY hh:mm:ss') as CaptureDateTime,
timestamp(LotStartDateTime,'MM-DD-YYYY hh:mm:ss') as LotStartDateTime,
LotNo,
Date(Floor(CaptureDateTime), 'MM-DD-YYYY') as DistinctCaptureDate
FROM
[..\2_QVDGenerator\QVD\HistoricalYears.qvd]
(qvd);
Swuehl,
I have changed my load staement with timestamps for all fields except LotNo and tested but i didn' t get exactly.that is why i posted again.
Please see once again.
Thanks...