Why am I getting these errors? (pic attached)

(pic not attached) 

edited instantly after posting apologies it didn't come through

Hi Shaan,

Your screenshot isn't showing all information to make a clear statement on what you do wrong.

But my guess is that the Aggregate GetFJLocation, is not part of the Screen FJLocationList.

Same for the Response structure, are you coding the assignments in the correct screen(action)?

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Shaan,

Your screenshot isn't showing all information to make a clear statement on what you do wrong.

But my guess is that the Aggregate GetFJLocation, is not part of the Screen FJLocationList.

Same for the Response structure, are you coding the assignments in the correct screen(action)?

Regards,

Daniel

I'm trying to add a favourite button on the FJLocationList screen so I'm doing the client action in there.


Can you share the screen design so I can see the data fetch and local variables defined, the information you shared is not enough to come to a conclusion what you do wrong.

Hi Shaan,

As Daniel said your screenshor doesn't show clear information. Please try to take screenshot with interface tab opened instead of data tab and also expand the screen you are coding in. Then only we can see the actual reason and will be able to suggest what is the issue and what can be the solution.

Oh Daniel already replied :)

Daniël Kuhlmann wrote:

Can you share the screen design so I can see the data fetch and local variables defined, the information you shared is not enough to come to a conclusion what you do wrong.


How do I attach it because I can't find the file when I click choose file

Make sure the screen design is visible in Service Studio, so we can see the screen, the variables, the Fetch data actions, and the client actions.

Then upload that screenshot as you did with your original post.

Daniël Kuhlmann wrote:

Make sure the screen design is visible in Service Studio, so we can see the screen, the variables, the Fetch data actions, and the client actions.

Then upload that screenshot as you did with your original post.

Does this help?



Daniël Kuhlmann wrote:

Make sure the screen design is visible in Service Studio, so we can see the screen, the variables, the Fetch data actions, and the client actions.

Then upload that screenshot as you did with your original post.


Or this?

Hi Shaan.

Your error is just one character :) 

GetJFLocation needs one parameter (of type JFLocationId) and returns one JFLocation. See it here?

From the expression you are trying to find an element of a list.


What you are probably trying to do is to read the result of GetJFLocations, the query that returns several records. This one.


Am I right?

If you just write the 's' it becomes GetFJlocations.List.Current.Favorites.___ it should work.


Nuno Reis wrote:

Hi Shaan.

Your error is just one character :) 

GetJFLocation needs one parameter (of type JFLocationId) and returns one JFLocation. See it here?

From the expression you are trying to find an element of a list.


What you are probably trying to do is to read the result of GetJFLocations, the query that returns several records. This one.


Am I right?

If you just write the 's' it becomes GetFJlocations.List.Current.Favorites.___ it should work.


I think you were right thank you.

There are still errors for other parts of the lines.(pic attached)

What is causing them?


It's not Locations but JFLocations. You can always use the autocomplete to find the right path.

Nuno Reis wrote:

It's not Locations but JFLocations. You can always use the autocomplete to find the right path.

JF nor FJ neither of them work

auto complete doesn't give me the right ones

In that case, the problem is bigger than that. And what is that Response you are assigning to the second variable?

Can you share the oml?

How do i attach the oml where do I find it when I click choose file?

You need to know where you saved it.

It can be done in Service Center, but you are already in Studio so: in Service Studio go to menu Module -> Export -> Save As

Choose where it will be saved.

Then on the forum upload that file. It is a .oml.

Nuno Reis wrote:

You need to know where you saved it.

It can be done in Service Center, but you are already in Studio so: in Service Studio go to menu Module -> Export -> Save As

Choose where it will be saved.

Then on the forum upload that file. It is a .oml.

Here's the oml.


I can find the JFLocations on the tree and the full path works.

The Response doesn't exist.

Nuno Reis wrote:

I can find the JFLocations on the tree and the full path works.

The Response doesn't exist.

Hi Nuno

Here is what I have now I'm down to 1 error. What is the issue here?

Kind Regards

Daniël Kuhlmann wrote:

Make sure the screen design is visible in Service Studio, so we can see the screen, the variables, the Fetch data actions, and the client actions.

Then upload that screenshot as you did with your original post.


Here's the latest screenshot with 1 error left I don't know why Current is not being accepted.

Any ideas?

Kind Regards

Hi Shaan,

You are trying to reference an attribute 'Id' of the Response local variable which is of type Response structure.

First, make sure to add the Id attribute to your Response structure in your Data Tab.

Then in the assign widget you can reference the Id attribute with 'Response.Id'.

Hope this helps.

Regards,

Nordin

Nordin Ahdi wrote:

Hi Shaan,

You are trying to reference an attribute 'Id' of the Response local variable which is of type Response structure.

First, make sure to add the Id attribute to your Response structure in your Data Tab.

Then in the assign widget you can reference the Id attribute with 'Response.Id'.

Hope this helps.

Regards,

Nordin

How did you see that I don't see this? (pic attached)



On more tip for you Shaan.

It is easier to open the expression editor in an Assign widget by clicking on the highlighted x.y icon.

After that the following popup will open where it is easier to look for the attribute you want to assign.

Shaan Rashid wrote:

Nordin Ahdi wrote:

Hi Shaan,

You are trying to reference an attribute 'Id' of the Response local variable which is of type Response structure.

First, make sure to add the Id attribute to your Response structure in your Data Tab.

Then in the assign widget you can reference the Id attribute with 'Response.Id'.

Hope this helps.

Regards,

Nordin

How did you see that I don't see this? (pic attached)



Can you share your latest OML like you did earlier? 


Nordin Ahdi wrote:

Shaan Rashid wrote:

Nordin Ahdi wrote:

Hi Shaan,

You are trying to reference an attribute 'Id' of the Response local variable which is of type Response structure.

First, make sure to add the Id attribute to your Response structure in your Data Tab.

Then in the assign widget you can reference the Id attribute with 'Response.Id'.

Hope this helps.

Regards,

Nordin

How did you see that I don't see this? (pic attached)



Can you share your latest OML like you did earlier? 


Here it is but it isn't fully up to date because of the error.

Kind Regards


Hi Shaan,

This is not the version with the error.

Anyway, I'm going to try the explain it to you in steps:

  1. Inside Service Studio, click on you Data Tab
  2. Under the Structures folder, right-click on the Response structure
  3. Click 'Add Structure Attribute' and name the new structure atrribute 'Id'


At this point your Response Local Variable you have under the FJLocationList screen, should have the Id attribute added to it. 

Notice that the Local Variable is of type Response structure (the same one you have just created the structure attribute for in step 3)


After this, you should be able to assign Response.Id to GetFJLocations.List.Current.FJLocation.LocationId

Regards,

Nordin

Nordin Ahdi wrote:

Hi Shaan,

This is not the version with the error.

Anyway, I'm going to try the explain it to you in steps:

  1. Inside Service Studio, click on you Data Tab
  2. Under the Structures folder, right-click on the Response structure
  3. Click 'Add Structure Attribute' and name the new structure atrribute 'Id'


At this point your Response Local Variable you have under the FJLocationList screen, should have the Id attribute added to it. 

Notice that the Local Variable is of type Response structure (the same one you have just created the structure attribute for in step 3)


After this, you should be able to assign Response.Id to GetFJLocations.List.Current.FJLocation.LocationId

Regards,

Nordin

You said right click the response structure but there isn't a response structure here look at this picture


Ok so I took a guess with that one, since it is really difficult to help you without your latest OML.

Earlier you have shared this screenshot:

Show me what is the Datatype of your Response Local Variable by just selecting it.


Ok I think I found it. It is probably this one right?

So if your Response Local Variable has Excel_CopyOfFindFujitsu as its Data Type, you need to add the Id attribute of here.

Then perform the rest of the steps I have mentioned earlier.

Good luck!