Skip to main content

Hey,

 

Here’s the situation, wondering if anyone has any insight that could help ?:

 

I have a Single Step Assistant based on a Structure (not a Virtual), with a Single OK Command

This Assistant is made of Groups that contains fields based on the Structure Attribute, and also a List which is based on an Entity and is Using a Function to get populated with some parameters present in the Structure.

 

 

My Process command in the Assistant basically takes one of the values in the structure and populates/refreshes all other fields, including OrderNo, ReleaseNo, SequenceNo. Once executed populated, this allows the List element to properly get populated with the data

 

I have my button also do a RefreshDb instruction , like this:

 

 

Here’s the problem:

 

Everything works fine at first, the list populates based on the parameters.

However, when I hit the button again, if anything in one of the fields in the list has changed, it does NOT update client side.

 

The call is made to the server (seen with the IFS Dev Tools Extension), the updated list data IS Returned by the server, but the Client/Browser field is NOT updated unless I manually force a refresh (say, by opening the filters of the list and clicking “Apply”).

 

I repeat to underscore it, this is really a DISPLAY problem, the data IS being retrieved from server properly and at the right time, but the element simply isn’t refreshing to SHOW the new data has arrived.

 

Is there a way to manually force a refresh of the client element on the page through Studio Developper ? I want it to refresh and populate new updated data without having the user clicking on the filter button, it needs to happen programmatically.

Ludependancy


Yeah tried that Phil (thanks for the input) but it’s not actually working at all. I tried to put ludependencies on both the Function that populates the List entity, the action that the asssitant command calls, on plenty of places really, but I’m not seeing any change, the client still refuses the update the list content even though it DOES download the actual updated data...

 

I don’t know if it’s because my List is “bound” from a Structure or whatever (and the Command is called from the Structure the assists sits in, rather than the list itself…

 

I’m willing to try some other ways if there are other definitions I could use (maybe use a query? or an array and binding or something?).


If you have ludependency the framework should handle the refresh for the associated entities of your ludependencies list. You're seeing the extra call to `GetShopMaterialAlloc()` because you are calling it directly, not because it belongs with any part of your client components. When it is set up like other examples that IFS has, you should see subsequent requests for all ludependent entities (and things that act like entities) without needing to refresh them manually.

I believe other definitions you mention would all do the same thing...
 

Ludependencies

A list of model entities that this function depends on. This is useful when using the function as an entityset to populate a component. The client can then automatically refresh the component when it gets notified that an entity in the list has been modified

```
function MyFunction List<Entity(CustomerOrder)> {
ludependencies = CustomerOrderLine;
}
```

 

I haven’t used the `refresh using` syntax and don’t see alot of detail other what autocomplete tells you... but I do see a few examples in the solution. So, you can look through those files to see what they are doing...but this is the path less traveled

 


I’m just wondering if there is a base limitation of using ludependencies or refresh using when using an Assistant as your base Client Page Type, or whether the limitation is on the Struct because it’s not an actual Entity

 

For Instance Here:

 

I’m trying to tell it “If Struct changes, handle the refresh of the component (a list of in this case) that is being populated through the function”, following the documentation.

 

But really, because it’s a Struct and not an Entity, I wonder if there’s a framework limitation where it doesn’t actually “see” the change in the Structure and therefore does not send a Client refresh request?

 


The difference might have to do with the methods that are called when changing data in an entity/virtual vs a structure