cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Issue with DateTime picker

sgobi
7-Bedrock

Issue with DateTime picker

Hi

We are trying to map DateTime picker to a DateTime Input parameter to use in SQL queries.

It is working fine when a Date is selected.

It does not work when nothing is picked.

Appreciate any help and comments

TIA
Sabarish

ACCEPTED SOLUTION

Accepted Solutions
qngo
12-Amethyst
(To:sgobi)

You would need another service which verify the datetime input before calling the SQL query service. When nothing is picked in DateTimePicker, you can decide to give a default value as input for SQL query.

View solution in original post

5 REPLIES 5
ibanham
12-Amethyst
(To:sgobi)

Have you tried adding a default value for the date/time input parameter for your SQL service?

sgobi
7-Bedrock
(To:ibanham)

No. I don't have a default value. I don't want a default value in my target table.

I will still try adding a default value to see if that helps.

Thanks

nkhose
12-Amethyst
(To:sgobi)

As datetime picker only has the changed event you can do the following

a) First give any default value through service which will be binded to Mashup Load Event

b) Then when the default value service is completed i.e ServiceInvokeCompleted you bind that to the SQL service you are now using on date time picker

changed Event

See below

5926269922836480.png?k=bAjheUNz0fw0ydO4fn986MGViF0

Whole Scenerio below 

5463329356644352.png?k=IX5S3k9ythzGZx74hRRBSZVxPAA

qngo
12-Amethyst
(To:sgobi)

You would need another service which verify the datetime input before calling the SQL query service. When nothing is picked in DateTimePicker, you can decide to give a default value as input for SQL query.

rpallares
1-Visitor
(To:sgobi)

Hi,

We had the same problem. For us the best solution was to create a search context with an infotable.

The binding works well through the infotable even if the date picker is undefined.

That problem is cleaner to encapsulate the entire search form. As seen, it's safer.

It allow too to pass the context through mashup parameters correctly, that is not working well with simple datetime data type.

Using a default value in services was not a good solution in our case.

Announcements


Top Tags