41
Views
12
Comments
Input date empty after saving data to Database - Reactive Web
Question

Hello,

I have a question regarding reactive web. In my screen i have an input with date data type assigned to a variable, when i hit Save it will then call server action to save to table. 

My problem is after the data saved and the screen refreshed the saved date didn't appear in the Input even though I already call the aggregate and assign it to the variable. But if I refresh the page the Input shows the saved date value.

Is there any steps i miss in reactive? Cause i don't encounter this problem in traditional web.

Many Thanks.

Rank: #1006

Hi Kevin,


    Can you provide the sample code?


Regards,

Zhou Shuai

Rank: #171

Hi Kevin,

I'm not sure if I understood your flow right.

After saving you are redirecting the user for the same screen, but passing an ID to it?

Then you have an aggregate and on it's OnAfterFecth action you assign the value to a variable, which is used by this input.

Is that right?

Any chance that you can share your Module's .oml file with us?

Rank: #1099

Here is the sample .oap

when there is no data, you input the new amount and then save.

Then if you want to update the amount you input in the Updated amount with the effective date. this effective date doesn't appear after you save, I also put expression that contain the variable and the expression shows the saved date.

DatePickerReactive.oap

Hi Kevin,

Try this , put currDate() in MinDate properties of DatePicker.

Your poc is working right now :)

Output:

Hope it will working for you. Good Day.

Thanks,

Samiksha

Please find DatePickerReactive_update.oml.

DatePickerReactiveupdate.oml

Rank: #648

Hi Kevin,

The assignment seems correct to me the only things is for "New Amount" you are using different aggregate with a filter as 

and for date input field you are using different aggregate with a different filter

and when click save then it always create records for "Currdate()" because you put a condition in "InsertMaxAmount" for "EffectiveDate" and they are ambiguous to each other.

As with the filters above it will only return value for "New Amount" you need to check the condition you put in "InsertMaxAmount" action for effective value.

Hope this will help you

Regards,

Vipasha

Rank: #171

Hey Kevin,

Let us now if you were able to solve your problem with this answers...

I download your app, but it is not clear to me what you were trying to do.

The amounts fields would be a value that you want to control?

Effective date is a control variable for you to know when it was updated?

And you want to have the previous value and the new value in the screen?




Champion
Rank: #136

Kevin Wie wrote:


Hello,

I have a question regarding reactive web. In my screen i have an input with date data type assigned to a variable, when i hit Save it will then call server action to save to table. 

My problem is after the data saved and the screen refreshed the saved date didn't appear in the Input even though I already call the aggregate and assign it to the variable. But if I refresh the page the Input shows the saved date value.

Is there any steps i miss in reactive? Cause i don't encounter this problem in traditional web.

Many Thanks.


 Hi Kevin Wie,

Please find the attached OML file with some modification code. so when refresh the page the date value still  appear.

https://amit-verma331.outsystemscloud.com/DatePickerReactive/DatePicker?_ts=637386441263352125

Let me know if you have any concern.

Hope this will help you :)

- AV

Thanks

 

DatePickerReactiveUpdatedCode.oml

Hi Kevin,

I wanted to understand why your aggregators are not in sync with the data you are stored.



Regards,

Rama