Refresh the Repeated Section when dropdown value has changed

Can anybody advise / help how to make the Repeated Section [ItemDescription] refresh when a dropdown value [ItemName] has been changed.

I have used a rule to make the fields within the repeated section to be disabled when the currentRowNumber() is bigger than the [ItemNumber]. However, as soon as you change the [ItemNumber] then the repeated section is not refreshed any longer.

I have tried something like this but does nothing:

NWF.FormFiller.Functions.ProcessOnChange(NWF$  ("#"+ItemNumber)); 

Please advise.

OAuth2 refresh token flow with mobile app

I’m having some issue with an access token not being refreshed in my mobile application. I’m trying to figure out what would be the best approach to fix it.

This is the scenario faced by some mobile app users:

  • A user logs in the app through the authorization code flow (webview of Identity Service)
  • The app exchanges the authorization code with an access + refresh tokens and stores the refresh token in the keychain for next time.
  • Next time, the user logs in to the app using a passcode.
  • The refresh token is sent to the Identity Service in exchange for an access token
  • The new access + refresh token is sent back to the app
  • The app never receives the tokens for some unexpected reason (network switched, lost internet etc. )
  • The app retries and sends the same refresh token again
  • The Identity Service refuses it because it’s been used already even though it never reached the app

Because the refresh token is single use only in our Identity Service configuration the user needs to go through the authorization flow again and needs to enter their username/password which is a quite annoying user experience.

In terms of security, a reusable refresh token could be an issue as well. If someone finds a way to steal it, a hacker would be able to login without the user being aware of it.

So I’m kind of in a deadlock and I’m wondering what’s the best approach to get the best security and also allow the user to reuse a refresh token in case the network dropped.

Few possibilities I thought of would be to:

  • Expire the refresh token not immediately but after X minutes to allow reusing it.
  • Emit a new refresh token but still accept older refresh token (up to X refresh tokens)

What’s the right approach in term of security?

Build angular and refresh browser on saving files in Visual Studio 2017?

I am building an core 2.2 web app with Angular SPA template. Until a few days ago I could see the browser refresh and reflect changes made on html and typescript files in Visual Studio 2017. Since then, there was an update to both Visual Studio and node modules.

Now the browser doesn’t reflect the changes made automatically. I am forced to run an ng build command using cmd for the angular app to get the changes on the browser. Is there a setting or configuration that needs to be changed.

I have already enabled Enable Browser Link option in the Visual Studio. This is not working.

Visual Studio version is 2017, 15.9.9

Design pattern for dashboard components and state refresh

I’m building a SPA with React as the front end. It basically consists of a dashboard-like page with 3 separate (but semi-connected) components. The components are:

  1. a messages/notifications area – user interaction consists of clicking a button to “dismiss” any of the messages
  2. an area with form inputs, buttons and lots of user interaction
  3. a datagrid with inline editing capabilities

Crude Wireframe: enter image description here

The content of all 3 is derived from a combination of:

  • user interaction/input on the page
  • info fetched from the backend API.

2-way binding is in place, so the UI state as it pertains to the former is already taken care of. It’s the latter I’m writing this post about.

Other users using the app at the same time may cause changes to the backend that need to be reflected as immediately as possible in all 3 components in order to create the experience of them being “live”. I am considering 2 approaches:

  1. query the backend on a set interval to check for updates for all components
  2. query the backend for changes to the active component when it becomes active/focused (i.e. the one the user has just clicked inside of)

And I guess there’s a third option of doing both.

I’m conflicted regarding #2…. will a split second of latency in the first click on the component EVERY TIME be frustrating for the user? or is it more frustrating to be working on something within the component and be interrupted for that split second while state is updated?

Remove notification messages on refresh

Sometimes the notification messages don’t get disappear on page reload or when I navigate to the different page.

Is there some kind of timeout for the notification message or some session cookies ?

I followed this link

Magento 2 : Error/Success message won't remove from page after refresh once display

But where should I put this code so that _deleteMessage call every time when the page reloads or user navigates to a different page.

Thanks in advance

Is it possible to dynamically refresh a calculated field on the Edit form when a connected field is changed?

On the Edit form, I am trying to dynamically have a calculated field show updated values when the connected field is changed. The idea is to give the user more details on the selected week. Is this possible?

I am using InfoPath to show calculated fields on the Edit form.

For example, I want to change from week 45 and want it to display the extra details in the calculated field. As you can see below: info path edit

However, it does not change once the relevant or connected field is changed from 45 to 46: enter image description here

Is there a way to have this done? I appreciate any help.

Edit: I am considering using PowerApps to modify the form, however, I still have no clue where to go to make the same request work on it. Researching…