current row no is not getting proper row

Hi

i have one grid,in that grid i have onrow function.but when i am clicking onrow function i am opening one popup and in the popup i have submit button when i am trying to click submit button every time i am getting first row.in Submit event i dont have any validation logic(no for loop)

Hi,

Can you provide screenshot ?

Toto wrote:Hi I am using reactive Web App.i have two web blocks.one web blocks i have table records.in this table record i have one onrow level function.i am opening a popup.when i am trying to send row level data to Popup screen every time i am getting first row or last row


Hi,

Can you provide screenshot ?

 

 

Arkyadeep Bharadwaj wrote:

Toto wrote:Hi I am using reactive Web App.i have two web blocks.one web blocks i have table records.in this table record i have one onrow level function.i am opening a popup.when i am trying to send row level data to Popup screen every time i am getting first row or last row


Hi,

Can you provide screenshot ?

 

 

 The input parameter of the block, did you put the entity record on it ?

And when entering that parameter, did you get the "current" one ?

 

yes i am using data action to get the data,i am passing the current one value.but in popup i am getting only first row.

Hi Arkyadeep,

I do also encountered the same observation but found a work around i.e.

Introduce an IndexValue Local variable of integer type within the screen scope and in every Row Click action - update the IndexValue Local variable with the Table.List.CurrentRowNumber value after this assignment, set the Popup boolean variable with True value

IndexValue = Table.List.CurrentRowNumber

See this Test App 


Somehow the passed Table.List.CurrentRowNumber to Block input parameter field is not getting updated on every row click action


Hope this helps you!


Regards,

Benjith Sam 

Hi Arkyadeep Bharadwaj,

I have to questions, maybe one of them will help you find the root cause of your problem:

  • Did you place your second Block (SkipDraftDatePopupRow) inside the row on the Table (otherwise it will not have the correct Current record)?
  • I notice the TransactionID and ScheduledDate inputs have very long values (and we cannot see how they end), but can't find any reference to a Current record... you need to make sure that the Current record you are trying to access is from the List that is being displayed/iterated in the Table (otherwise you will likely always get the same result).

Hope this helps!

Benjith Sam wrote:can u please provide me sample OML

Hi Arkyadeep,

I do also encountered the same observation but found a work around i.e.

Introduce an IndexValue Local variable of integer type within the screen scope and in every Row Click action - update the IndexValue Local variable with the Table.List.CurrentRowNumber value after this assignment, set the Popup boolean variable with True value

IndexValue = Table.List.CurrentRowNumber

See this Test App 


Somehow the passed Table.List.CurrentRowNumber to Block input parameter field is not getting updated on every row click action


Hope this helps you!


Regards,

Benjith Sam 

 

 

Arkyadeep Bharadwaj wrote:

Benjith Sam wrote:can u please provide me sample OML 

Sure, Please find the attached .oml file


Regards,

Benjith Sam

Jorge Martins wrote:

  • Did you place your second Block (SkipDraftDatePopupRow) inside the row on the Table (otherwise it will not have the correct Current record)?Yes
  • I notice the TransactionID and ScheduledDate inputs have very long values (and we cannot see how they end), but can't find any reference to a Current record... you need to make sure that the Current record you are trying to access is from the List that is being displayed/iterated in the Table (otherwise you will likely always get the same result).
  • GetLoanAccountTransaction is the LIst data

Hi Arkyadeep Bharadwaj,

I have to questions, maybe one of them will help you find the root cause of your problem:

  • Did you place your second Block (SkipDraftDatePopupRow) inside the row on the Table (otherwise it will not have the correct Current record)?
  • I notice the TransactionID and ScheduledDate inputs have very long values (and we cannot see how they end), but can't find any reference to a Current record... you need to make sure that the Current record you are trying to access is from the List that is being displayed/iterated in the Table (otherwise you will likely always get the same result).

Hope this helps!

 

 

Arkyadeep Bharadwaj wrote:

  • GetLoanAccountTransaction is the LIst data
  • I notice the TransactionID and ScheduledDate inputs have very long values (and we cannot see how they end), but can't find any reference to a Current record... you need to make sure that the Current record you are trying to access is from the List that is being displayed/iterated in the Table (otherwise you will likely always get the same result).

According to your screenshots, for everything to work as expected, your Table's Source should be GetLoanAccountTransaction.TransactionsList.PaymentSchedules, is that what you put there?

Apologies if the questions seem to be basic, but trying to troubleshoot the obvious pitfalls first ;)

 

Jorge Martins wrote:

Arkyadeep Bharadwaj wrote:

  • GetLoanAccountTransaction is the LIst data
  • I notice the TransactionID and ScheduledDate inputs have very long values (and we cannot see how they end), but can't find any reference to a Current record... you need to make sure that the Current record you are trying to access is from the List that is being displayed/iterated in the Table (otherwise you will likely always get the same result).

According to your screenshots, for everything to work as expected, your Table's Source should be GetLoanAccountTransaction.TransactionsList.PaymentSchedules, is that what you put there?

Apologies if the questions seem to be basic, but trying to troubleshoot the obvious pitfalls first ;)

 

 

 

Yup, everything seems to be in order... have you checked/debugged your second block to see what it gets on its inputs?

Can you show me how you implemented it UI-wise (in particular how you are configuring the popup)?

Jorge Martins wrote:UI wise means?not clear what u want to see

Yup, everything seems to be in order... have you checked/debugged your second block to see what it gets on its inputs?

Can you show me how you implemented it UI-wise (in particular how you are configuring the popup)?

 

 

I was asking to see the your SkipDraftDatePopupRow Block, namely the UI canvas with the widgets and patterns layed-out inside, along with the Widget Tree View with all elements expanded, and the Properties of the Popup widget.

Jorge Martins wrote:

I was asking to see the your SkipDraftDatePopupRow Block, namely the UI canvas with the widgets and patterns layed-out inside, along with the Widget Tree View with all elements expanded, and the Properties of the Popup widget.

 

 

Jorge Martins wrote:

I was asking to see the your SkipDraftDatePopupRow Block, namely the UI canvas with the widgets and patterns layed-out inside, along with the Widget Tree View with all elements expanded, and the Properties of the Popup widget.

 

 

Jorge Martins wrote:pfa

I was asking to see the your SkipDraftDatePopupRow Block, namely the UI canvas with the widgets and patterns layed-out inside, along with the Widget Tree View with all elements expanded, and the Properties of the Popup widget.

 

 

Hi Arkyadeep,

I had a look at your module, don't see anything obviously wrong either.

You are logging the request that was generated as a JSON string, does it always show the same details for Request.Payload[0].Id and Request.Payload[0].Scheduled?

Hi Arkyadeep,


I think your problem might be related to only having one swith as local variable, to control open/close of all webblock popups in the list.  So in the SkipDraftDateOnClickRow, you set this local popup switch to True.

Nothing about that statement refers to the actual row that you clicked in.  If so many popups are connected to this same switch, how would OS know which one you want to open ?  

To be honest, I would have expected all the popups to open, so one for each row in your table.  As it is, he maybe goes through all rows, opening them, and maybe there is some mechanism in OS preventing 2 popups to be open at the same time, so you allways end up with the last row's popup opened or something.  Or maybe he opens them all on top of each other and you only see the last one ??

So, You could add a switch to the aggregate result list, defaulting to False, and switch the current row boolean instead of the single local boolean.


Dorine

Ok,

did a quick demo app, confirming that he opens all popups, with the last one on top.

See attached oml, I show the popups at a different spot dependent on rownumber to make it visual, but you can see if you open with devtools in chrome that all popups with their values are there.

Dorine


PS never mind the name of the oml, my initial thought was that putting the same aggregate on the same screen twice was what confused OS about what should be considered 'current'.

Hi Arkyadeep,

With what Dorine mentioned, your issue became clear.

You need to handle the popup opening/closing logic from inside your SkipDraftDatePopupRow Block, not from the Transactions Block.

Thanks Dorine, you have a keen eye!