App connect variable to server connect (for date picking retrieve data from DB)

Hello,

I have a DB where data is stored with a datatime stamp. I have a table and i want in different rows different data from DB based on datetime. So i think i need a variable i set to filter the date in server connect but i cannot see App connect variables in Server connect.

How do i best get this working

Tables rows:

----------------------
|  DB Data Mon |
----------------------
| DB Data Tue   | 
----------------------
| DB Data Wed  |
----------------------
| DB Data Thu   |
----------------------
| DB Data Fri     |
----------------------
| DB Data Sat    |
----------------------
| DB Data Sun   | 
----------------------

Nobody ?

It will be much better to start by reading the documents.

I am sorry but this is not really usefull. I am not a newbie. Just can’t figure it out

This is the starting point and the question you asked is very basic. For this reason, I suggested this.

Ok i just can’t figure it out

I have the following:

<td>

<form id="GetSetTSMon" is="dmx-serverconnect-form" action="dmxConnect/api/security/UserDetails.php" autosubmit method="post">

<input type="hidden" dmx-bind:value="var1.datetime.addDays(-var3.value).formatDate(&quot;yyyy-MM-dd 00:01:00&quot;)" name="tsfrom" />

<input type="hidden" dmx-bind:value="var1.datetime.addDays(-var3.value).formatDate(&quot;yyyy-MM-dd 23:59:00&quot;)" name="tsto" />
</form>

{{serverconnect1.data.GetTimesheetV3[0].client_name}}
</td>

<td>

<form id="SetTSTue" is="dmx-serverconnect-form" action="dmxConnect/api/security/UserDetails.php" autosubmit method="post">

<input type="hidden" dmx-bind:value="var1.datetime.addDays(-var3.value+1).formatDate(&quot;yyyy-MM-dd 00:01:00&quot;)" name="tsfrom" />

<input type="hidden" dmx-bind:value="var1.datetime.addDays(-var3.value+1).formatDate(&quot;yyyy-MM-dd 23:59:00&quot;)" name="tsto" />

</form>

{{serverconnect1.data.GetTimesheetV3[0].client_name}}
</td>

So the 2 form post data to the Userdetails.php wich is linked to serverconnect1

It will get data from this monday and tuesday

For monday there is data in MySQL and for tuesday not

Monday:

image

Tuesday:

image

The question is why wont the command {{serverconnect1.data.GetTimesheetV3[0].client_name}} doesn’t display the data on monday ?

please share your mysql query

Try reversing the order of the dates

You mean this ?

image

Then i got no result on monday:

image

I i put this in the order of before i get result for monday as it should be

this is query issue not releated with wappler . you can use custom sql

But it returns data

image

The question is why wont the binding: {{serverconnect1.data.GetTimesheetV3[0].client_name}} doesn’t display the data on monday ?

I think you are doing something easy in a very difficult way.

Could you maybe explain what are you trying to achieve in first place?

Ok. I have the following table:

Date’s in de tableheader are dynamicly created. In the cells below the date i want to get data from a MySQL DB with the following conditions:

So i thought like i explained above how to get the values of the dates