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
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?
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,
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:
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:
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.
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).