Truncate text if user is not login

Hello,
In my application,I am generating article via chat gpt.
In terms of user experience, there is a first page to define the article the user wants to generate and a second page where the output from chatgpt is displayed. Today it is accessible to anyone and it’s free.
So in the page with the output, if the user has not login, I’would like to display a truncated article (200 characters for example) and an element to login. Once login, the full article is displayed

COuld you advice how to implement this user experience.
THx in advance,
JB

Just add a condition to your existing element that checks if the user is logged in or not.
Then truncated the arbitrary text to 200. In the arbitrary text you can dynamically add the same expression that you have in your existing element.

image

Hello and thx Lloyd,
I have added the condition but I am still seeing the full content of the article, while I am not logged in.
Please see the screenshot if it can help.
Thx again

That should work :thinking:

What is in your Arbitrary text?

It’s a content generated by chat gpt.
It’s saved in “App Data”, and so “dynamic Data”… If it can help !
Thx to you

Can you send a screeshot of in the arbitrary text?

Hello, do you mind if l help get this done for just a recommendation? If interested kindly let me know. Thanks

Hello Lloyd,
Not too sure what you are expecting so see attached various screenshots on the UxP.
Basically in Step 3 (when logout), I should see the 200 first characters (or words) of the content displayed in Step 5.
I have also added the screenshots from the Design page and conditional.

Hope it can help.
Thx in advance



Step2-Loggout

Step4-Login

This topic was automatically closed after 70 days. New replies are no longer allowed.