fetching data combo box on change

Hi guys, 

I have a case where I have two entities. the first one includes times (timeline) the second on dates (schedule).

they are connected. "Schedule" has a "TimelineId"

In the detail screen I have a combo box asks to select the coresponding timeline and also an expression with the times from this timeline. 

I have a onChange action connected to this combo box which shall do two things. 

1) Activaltes if TimelineId <> Null()) show context and 

2) also it shall fetch data from the source (timeline) and automatically update the times. 

Unfortunaltaly step 2) isn´t working it changes times after saving and reopening the detail screen but not on change :( 

I copied the onChange action maybe someone can support.


Cheers!

Tobias 


Hi, BigSilkTobi,


You should add an assign which sets the value of the form with the value of the query before the AJAX refresh.

This happens because when using the Form widget you need to bind it to its new values explicitly.


Cheers,

João


BigSlikTobi wrote:

Hi guys, 

I have a case where I have two entities. the first one includes times (timeline) the second on dates (schedule).

they are connected. "Schedule" has a "TimelineId"

In the detail screen I have a combo box asks to select the coresponding timeline and also an expression with the times from this timeline. 

I have a onChange action connected to this combo box which shall do two things. 

1) Activaltes if TimelineId <> Null()) show context and 

2) also it shall fetch data from the source (timeline) and automatically update the times. 

Unfortunaltaly step 2) isn´t working it changes times after saving and reopening the detail screen but not on change :( 

I copied the onChange action maybe someone can support.


Cheers!

Tobias 


What are you creatingOrUpdate Trip? the comboBox Values?


Your description was a bit confusing.

Luckily you mistake is quite easy to find.

You are simply updating the query. You now need to Assign the new value in that query into the variable on that expression.

Nuno Reis wrote:

Your description was a bit confusing.

Luckily you mistake is quite easy to find.

You are simply updating the query. You now need to Assign the new value in that query into the variable on that expression.


Hi, 

thanks for your help! 

somehow it doesn´t work. 

Let me try to explain the challenge again.

In our systems we have a timetable which includes starting times as well as ending times. 

Lets say the timetable "Monday" has the starting time 08:00 and the ending time 14:00. The timetable "Tuesday" has the starting time 09:30 and the ending time 15:30. 

The user has to create events. He has to assign the timetable to a given date. In the event detail he shall choose a timetabel. Than he shall select a date and the system automatically insert the starting and ending time.

So the user takes the 04th of February. In the Event detail he selects the timetable "Monday" from a combo box. Now the system shall, as an OnChange Event, fetch the data from the timetable and writes it in the event detail.

And this doesn´t work. When saving the event and reopen the event detail the time is set but it issn´t on change... 

I attached a file where I assigned the onChange to the expression I am trying to change. But this doesn´t work, too.

Best regs

Tobias 

BigSlikTobi wrote:

Nuno Reis wrote:

Your description was a bit confusing.

Luckily you mistake is quite easy to find.

You are simply updating the query. You now need to Assign the new value in that query into the variable on that expression.


Hi, 

thanks for your help! 

somehow it doesn´t work. 

Let me try to explain the challenge again.

In our systems we have a timetable which includes starting times as well as ending times. 

Lets say the timetable "Monday" has the starting time 08:00 and the ending time 14:00. The timetable "Tuesday" has the starting time 09:30 and the ending time 15:30. 

The user has to create events. He has to assign the timetable to a given date. In the event detail he shall choose a timetabel. Than he shall select a date and the system automatically insert the starting and ending time.

So the user takes the 04th of February. In the Event detail he selects the timetable "Monday" from a combo box. Now the system shall, as an OnChange Event, fetch the data from the timetable and writes it in the event detail.

And this doesn´t work. When saving the event and reopen the event detail the time is set but it issn´t on change... 

I attached a file where I assigned the onChange to the expression I am trying to change. But this doesn´t work, too.

Best regs

Tobias 

"And this doesn´t work. When saving the event and reopen the event detail the time is set but it issn´t on change..." -  but on database is saved? The issue is only when you open the detailPage?



Pedro Vila Nova wrote:

BigSlikTobi wrote:

Nuno Reis wrote:

Your description was a bit confusing.

Luckily you mistake is quite easy to find.

You are simply updating the query. You now need to Assign the new value in that query into the variable on that expression.


Hi, 

thanks for your help! 

somehow it doesn´t work. 

Let me try to explain the challenge again.

In our systems we have a timetable which includes starting times as well as ending times. 

Lets say the timetable "Monday" has the starting time 08:00 and the ending time 14:00. The timetable "Tuesday" has the starting time 09:30 and the ending time 15:30. 

The user has to create events. He has to assign the timetable to a given date. In the event detail he shall choose a timetabel. Than he shall select a date and the system automatically insert the starting and ending time.

So the user takes the 04th of February. In the Event detail he selects the timetable "Monday" from a combo box. Now the system shall, as an OnChange Event, fetch the data from the timetable and writes it in the event detail.

And this doesn´t work. When saving the event and reopen the event detail the time is set but it issn´t on change... 

I attached a file where I assigned the onChange to the expression I am trying to change. But this doesn´t work, too.

Best regs

Tobias 

"And this doesn´t work. When saving the event and reopen the event detail the time is set but it issn´t on change..." -  but on database is saved? The issue is only when you open the detailPage?



the new time isn´t shown in the database of the detailed page... 

Do I have to change something in the preperation?


Can you send your OML?

Thanks for having a look

Solution

Hi BigSlikTobi


I see a lot of confusion on this screen ( of what I think you intend to do ) : 


This Assign don't do nothing.

----

You don't need that Escape Content.

As you can see, at "ScheduledDepartureTime", you use form Value.


So at your Save Action, you use the form values.


So at on your onChange Action you need to refresh only on the afect values, so that 2 expressions ,  AND  made the really assings to forms... 


Take my comment in consideration, make some changes.

And give me your feedback.


Best Regards,

Pedro Vila Nova

Solution

Thanks for your feedback! 

as I had no idea how to solve the issue I tried out different variations therefore it really was confusing, sorry. 

Thanks for your help so far, I guess I need to go through some more tutorials.


Best regs

Tobias