Content Logic Issue

Mission: SERVERLESS 101
Task: Invoke the API Service using generated client SDK

Please, describe your problem here.
As soon as I set the content logic of the text field in instructionBlock to ‘instructionBlock data’, the entire preview page goes blank
When I set the content logic for the 3 text fields in cartContentsContainer as instructed, that container and its 3 text fields then disappear from the preview

Hello @Martin_Schofield

Welcome to our community and thank you for trying out Backendless.

We will be happy to assist you. I need to ask you a few more questions so I can understand the problem better.
In the previous task, you created the CodelessShoppingCartService service and did you consider this task?
Did you download this service using the Download Client SDK icon?
In which IDE do you work?

Please tell us in more detail what exactly you do. You perform these actions on the console in the Cloud Code section, in which method?

Regards,
Volodymyr

Hi Volodymyr,
Yes, I performed the previous task, I downloaded the service by clicking the Business Logic button, then the + to add an API, then selecting the Codeless tab and ticking the Shopping Cart tickbox. It now appears in the API Services section on the Logic page as it should.

I use the codeless IDE at (Backendless) - you’ll see the page ends in 2 because I just started the video tutorial again on a fresh page, and got the same error.

I don’t think it is to do with the CodelessShoppingCartService, as the error occurs before I have created the logic connecting GetInstructions to instructionsBlock. As soon as I connect the ‘“instructionsBlock” Data’ block to the text field’s ‘‘Content Logic’ Return’, the preview goes blank. As soon as I delete the ‘“instructionsBlock” Data’ block, I get the preview page back as before (minus the text, as it now has an empty Content Logic setting). It also does the same if I set up the logic connecting GetInstructions to instructionsBlock first.
The only difference from the video is that he uses Dynamic Lists, whereas I have Data Containers, so I assume his IDE version is different to mine. Should I try using a container instead of a block?
I hope this helps you find the problem.
Thanks for your time,

Martin Schofield

Are you talking about the app with applicationId 9FE029EF-7664-8B60-FFF5-EEA010D1D900?

Are you talking about UI Builder?

What exactly is the error? Could you provide a screenshot and/or text of this error?

What is meant by the word “connect” here?

Regards,
Volodymyr

Yes to the app id and yes I am using UI Builder
When, as the video instructs, I create a text field in a block called instructionBlock, then click the text field’s code button to enter its Logic editor, then click the + next to Content Logic, I get a purple Content Logic block on the screen with 3 blocks above - ‘App Data’, ‘Page Data’ and ‘instructionBlock Data’. The video says to connect the ‘instructionBlock Data’ block to the return of the Content Logic block - the screenshot below should show this if it comes through:


Before I set the text field’s Content Logic, the App Preview shows this:

After I connect the ‘instructionBlock Data’ block to the text field’s Content Logic’s Return, when I click the App’s Preview button the entire page is blank - no Page Title, no Get Instructions Button and no text field - and it then remains blank until I delete the instructionsBlock Data block from the Content Logic’s Return

This is the UI Builder editor for the page - you’ll see that I have ticked DataContainer under Settings, as this was the nearest item I could find to the Dynamic List tickbox in the video instructions:

Are you talking about the video instruction (How to invoke a Backendless API Service using generated SDK) for the Invoke the API Service using generated client SDK task from the SERVERLESS 101 mission, which you wrote about in your first message, or about some other video instruction?

Regards,
Volodymyr

Yes, this is the link:
How to call API services from UI Builder using Codeless (youtube.com)
This is the screenshot:


You’ll see he has a slightly different IDE version in the video, with the extra word ‘item’ in the block and Dynamic List instead of Data Container in the column on the left.

Thanks, Martin

Hi Martin,

The “instructionsBlock” element in the USER INTERFACE needs to be marked as Repeater:

The Repeater used to be known as “Dynamic List Behavior” which is what’s referenced in the video. Once you mark it as Repeater, then in the logic, the block to return will appear as it does in the video (with the word item in it).

For more information about Repeaters, please see the documentation:
https://backendless.com/docs/uibuilder/ui_repeaters.html

Regards,
Mark

Hi Mark,
Thanks a lot - I made the changes and it works now.

I’ll see if I can limp through the rest of the tutorial after dinner.

Regards, Martin