How to maintain a List of Date Picker & its result

How to maintain a List of Date Picker & its result

  

Hi,

I have a ist of Date Picker in Screen - Mobile App.

The List Data is coming from an REST API, The API contains some Date's & that I want to map with particular List Item Input Type Date i.e DatePicker.

Input Type require the InputVariable to hold value.

How can I add multiple variable to dynaic list & assign the default value i.e date based on API data.

I am planing to use ''Date List' type variable & pass var.current to input Type Variable but how can I assign the default value to every Input from api.



Hello assif...

Not sure I'm following your problem...

You have a list of dates that come from a REST API.
Than you want to show a list of DatePickers in screen, each one that has one of the dates that comes from the REST?

What's the problem of pass as Source of the list in the screen the list returned from the REST, and associate the DatePicker with this attribute of the list structure in the list?

Is there something here I am missing not understanding in your requirement? 

Cheers.

Eduardo Jauch wrote:

Hello assif...

Not sure I'm following your problem...

You have a list of dates that come from a REST API.
Than you want to show a list of DatePickers in screen, each one that has one of the dates that comes from the REST?

What's the problem of pass as Source of the list in the screen the list returned from the REST, and associate the DatePicker with this attribute of the list structure in the list?

Is there something here I am missing not understanding in your requirement? 

Cheers.


Hi Eduardo, Sorry for in Appropriate Question:

Here it is :

Have an Screen on which I have a List. The List Data comes from a REST API.

In List-Item I have added a DatePicker i.e input with Type as Date.

I have below requirement -

 - Set default date of picker based on respective record from aggregate i.e API data

- User will change the date in any List-item Date-Picker & I have to fetch that Date to proceed further.


As of every Input Field demands an  Variable that holds its value so I was not able to get this.


Should I provide Aggregate Attribute Value in Variable Field & use OnChange Listener to get the respective field value.

Thanks


Assif, use the Date that is comming from the REST, that is part of the list you gave as source to your list in screen, as the variable of the input...

For example.

You have a REST the returns a list of something like (just as an example):

Struct {

     text fieldText;

     date fieldDate;
}

And you want a datepicker that has as default value the fieldDate.

Why not use the fieldDate as the variable itself? List.Current.fieldDate.

That is the part I am not understanding...
DO you need to save the result of the datepicker in a different variable (of the list)?