Liquid: How to check if a collection contains elements of web application and display the custom message

It's my code, but it does not work:


{module_webapps id = "28860" filter = 'all' resultsPerPage = '20' hideEmptyMessage = 'false' template = "" collection = "seeWinners" "}

{% for article on seeWinners.items-%}

{% If items.seeWinners ==""-%}

< p > winning number yet, come back again < /p >

{endif %}

{% endfor}

Please can someone tell me what is the problem?

Thank you.

No need for the loop.

Just get the length of the array.

{module_webapps id = "28860" filter = 'all' resultsPerPage = '20' hideEmptyMessage = 'false' template = "" collection = "seeWinners" "}

{% If seeWinners.items | size == 0-%}

No winners yet, check again

{endif %}

Later edit: and if you are already in the loop, you have the length of the array loop with: {{forloop.length}}

Tags: Business Catalyst

Similar Questions

  • How to check if a list contains elements of another list

    Hi all

    I'm just checking if a text list contains items form another list and do something. I tried:

    Tlist contains phrases of the text (for example, test1, test2, test3)

    phrases = ["test1", "test2"]
    n = phrases.count)

    tList.getPos (phrases.item [n])
    Alert ("should not be included in the list")

    But it does not all ideas, why?

    There might be a quicker way, but I think you need to loop through at least one of your lists. Maybe something like this:

  • How do I click on a cell in a table control and display the value in a string?

    What I want to do is click on a cell in a table control and have the value of the cell in an indicator of the chain. Cell that ever I click on, I wish that the value to be displayed in the indicator.

    Thank you!

    Use the property "Change Position".

  • Freezes at "Loading ImporterQuickTime.prm" and displays the error message. How should I do?

    Hey, I just built a system of game development, I do my trailer for the game now, but Premiere Pro will not work. The operating system is Windows 10 and my GPU is a MSI GTX 970.

    I advanced and installed Premiere Pro and it has installed without error, but when I went to start it for the first time, he stopped at "Loading ImporterQuickTime.prm" and then jumps to the top 'Adobe Premier Pro cannot find capable video game modules. Please update your video display drivers and start over. "He has only one button, you can press on and it is 'OK '. When I press on it just says: "Premiere Pro has stopped working." and makes me close. (screenshot attached).

    What confuses me, is that Photoshop and After Effects work perfectly. (perhaps because they have CS6?)

    I was puzzled because I already had the latest NVIDIA drivers installed, so I downloaded the beta version of the drivers and I still got the same error. I've uninstalled and reinstalled Premiere Pro several times, but I still get this error. My current version of the graphics driver from NVIDIA is 362,00.

    Any help is greatly appreciated.

    Screenshot (58).png

    Well, after a few hours trying things at random, I tried using a different user account, so I opened and administrator command prompt and typed in "net user administrator / Active: Yes" then disconnected and connected to the administrator account, then launch Premiere Pro to launch it. Surprisingly, it worked! So I closed the first, then disconnected from the Admin account, then went back on my main account and typed in "net user administrator / active: No.". Then I launched creating my account and it worked!

    I hope this might help someone else who was in my boat.

  • I had designed a Web application and tested on Firefox 18, 19, 20 and now when I check it on 21 version it is not rendered correctly. Now tell me what I need to do.

    I had designed a Web application and tested on Firefox 18, 19, 20 and now when I check it on 21 version it is not rendered correctly. Now tell me what I need to do.

    https://developer.Mozilla.org/docs/Mozilla/Firefox/releases/21

  • How can I display the custom field in Office Communicator so that everyone can see?

    In OCS, on your personal page, there is an option for the current location - create the custom location, I want to display the "custom" location instead of the busy, can someone help on how it works?

    Hello PK,.

    This forum is the right forum for this type of question:
  • How do I create a Wizard of action as both copies and highlights the text?

    Hello

    This may show that I am not a very experienced user, but that's it. How do I create a Wizard of action as both copies and highlights the text? I want to make a tool that does both, but when I try in Action Wizard I don't see these editing options.

    Help appreciated.

    See you soon,.

    Michael

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Prof. Michael A. Gilbert

    Coordinator computer SCIENCE

    Department of philosophy

    424 Ross S

    [email protected]

    f; Coco

    Is not possible.

  • How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    I s generic SOAP example/tutorial on my blog: get a serial number in a form using SOAP - KHKonsulting LLC

    The web service uses only a single parameter, but you should be able to adapt the code to two arguments without problems.

  • How to capture and display the end of line character in the report

    Hi guys,.

    I have a report that we are poster campaign ID, campaign name, and Description of the campaign.
    The result is coming like this

    Description of campaign campaign campaign ID name
    1 ABC 1 Plan June 13. 2 market July 1. 3. end July 30.
    Plan XYZ 2 1 13 June. 2 market July 1. 3. end July 30.

    But we want the data to be displayed in the following format.

    Description of campaign campaign campaign ID name
    1 ABC 1 Plan June 13.
    2 market July 1.
    3. end July 30.
    Plan XYZ 2 1 13 June.
    2 market July 1.
    3. end July 30.
    That the user has the possibility to enter several lines for the description in front end Application & want us to show the same way Description. How can I capture this end of the character in ETL? If he is already captured, then how to show in the report.
    I use Siebel as before end application and for the ETL using Informatica.

    Any help will be much appreciated.

    Thank you
    Rupesh

    OBIEE presentation Service is an HTML element based on software then it does not show the end file character CHR (10) or Chr (13).
    You must replace this with the HTML tag charcaters
    .

    I'm not sure of the name of the function, but you must make a formula like this

    replace(mytable.mycolumn, chr(10), '
    ')

    See you soon
    Nico

  • How to write a procedure to call and run the custom package backend

    Hi all

    Oracle 10g
    Oracle Apps R12

    I work with here oracle order management, we have a package called (Pick Release) to customize. Due to a problem, we have this concurrent program execution manually giving Route_id as parameter. The route_id comes from the road to the Table. By using this query

    Select distinct route@DB_LINK_APPS_TO_ROADSHOW route_id
    When trunc (route_date) = trunc (sysdate + 2).

    on a daily basis, we have almost 42 routes and we run this simultaneous program manually close times.

    so now how to write a procedure for this

    Step 1 make the route to the routing table. (By cursor we can get the route_id accordingly)

    Step 2 How to trigger custom backend package and run accordingly to this output of the cursor (route_id)

    If 40 routes of cursor get is - that the simultaneous program runs 40 times according to this route_id.


    can some could provide the steps to do this


    Thanks and greetings

    Srikkanth.M

    To submit a competing request from the back - end:

    FND_REQUEST. SUBMIT_REQUEST (Client or server)

    Summary

    function FND_REQUEST. SUBMIT_REQUEST

    (application IN varchar2 default NULL,

    program IN varchar2 NULL by default,

    Description IN varchar2 default NULL,

    start_time IN varchar2 default NULL,

    sub_request IN default boolean FALSE

    Argument1,

    argument2,..., argument99.

    Return to argument100 number);

    Description

    Submits a competing treatment by a simultaneous Manager. If the query is successful, this function returns the ID of the concurrent request; Otherwise, it returns 0.

    ATTENTION: FND_REQUEST needs to know information about the user and accountability whose application is submitted. Therefore, this feature works of concurrent programs or forms within the Oracle Applications.

    The FND_REQUEST. SUBMIT_REQUEST function returns the ID of the concurrent application after successfully. It is up to the caller to issue a commit to complete the application.

    Your code should retrieve and handle the error message generated if there is a problem of presentation (the ID of the concurrent request returned is 0). Use FND_MESSAGE. RETRIEVE and FND_MESSAGE. ERROR to retrieve and display the error (if the application is made on the client side).

    Related essays: overview of the Message dictionary (see page)

    You must call FND_REQUEST. SET_MODE before calling FND_REQUEST. SUBMIT_REQUEST of a database trigger.

    If FND_REQUEST. SUBMIT_REQUEST fails to go anywhere but a database trigger, database changes are cancelled until the time of the function call.

    After a call to the FND_REQUEST. SUBMIT_REQUEST function, installation of all parameters are reset to their default values.

    Arguments (input)

    short name of the application associated with the concurrent request for enforcement.
    short simultaneous program (not the executable) name of the program for which the application must be made.
    Description Description of the application that appears in the form of concurrent requests (optional).
    start_time time during which demand is expected to start running in the (optional) HH24 or HH24:MI:SS format.
    sub_request set to TRUE if the request is made by another application and should be treated as a subquery.
    From version 11, this parameter can be used if you submit requests for in a concurrent program of PL/SQL stored procedure.
    argument1... 100 arguments for the concurrent request; up to 100 arguments are allowed. If the Oracle Forms submitted, you must specify all arguments of 100.

  • How to check if a block contains all records in it?

    Hello

    I need to check if there are any records in a block. According to the test result, I then do something else as a result. Is there a system variable or the construction-ins that I use to check this status? I want to do something like:

    IF the block is empty then
    do action1
    ON THE OTHER
    do action2
    END IF;

    Any help or suggestions eraf appreciated.

    Michael

    You can use a calculated for this item:
    Create an IT_COUNT element in a BL_CONTROL control block, set 'calculation mode' to 'Summary' and choose the block to check that 'down the block"and a non-NULL-article in the block as"Summary"as a formula of calcution choose 'Count '.

    Now you can use in your code,

    IF :BL_CONTROL.IT_COUNT>0 THEN
      ..
    
  • How to filter the elements of web application with element Boolean field is checked (true) in module_webapps

    Maybe I forget something in the docs of BC but I can't find an answer to my question.

    How can I filter the web app items when a web-app-point-Boolean field (= true) in the backend?

    The web application itself is a list-web-app. What I want to achieve is, that when the web-app-point-field is selected, the web - app element (and its web-app-point-fields) will be displayed on the web page.

    The web page contains code that refers to the web-app-point-fields

    Hope you can help me with this.

    Thank you

    Sincerely, Carla

    Are you referring to the return of the page, using liquid, if the box is checked?

    For the rendered Liquid, you can do this:

    {% If this.} {["My Boolean field'] == '1'-%}

    The Boolean field is checked, show some fields or information are here.

    {%-%}

    The Boolean field is not checked so that you can show what you want here.

    {endif %}

    If you don't want to show anything if it is not checked, then proceed as follows:

    {% If this.} {["My Boolean field'] == '1'-%}

    Go only if it is enabled.

    {endif %}

  • Check if a string contains "text" in a box, and only if it does not, add it to the chain.

    I have some comboboxes. I want a text field to add a channel to itself, that contains the text selected in each combobox. I got it with this:

    var a = this.getField ("CoBi_text");

    for (i = 1; i < 16; i ++) {}

    var t = (this.getField("CoB_"+i).valueAsString);

    Si (t ! = « ») {}

    a.Value += t + ',';   }   }

    But what adds text even though I select the same option in any of the combobox control. How can I include a conditional don't skip the increment if "the text is already in the string?  I tried this:

    If ((t! = «») & & (a.value.indexOf ("t") < 0)) {}

    a.Value += t + ',' ;}

    But it causes the chain add the text first, don't increment not any text more after that.

    PS. This text field will be hidden and later used on another condition (if it contains 'a specific text'), some other triggering actions.
    So the ',' (comma) is probably not necessary, but I think that it should not be in the way of a proper search indexOf (right?)

    Thank you.

    eHRM, nevermind. I got it.

    the "t" inside indexOf should not "s...".

    var a = this.getField ("CoBi_text");

    for (i = 1; i<16;i++)>

    var t = (this.getField("CoB_"+i).valueAsString);

    If ((t! = «») & (a.value.indexOf (t))<0) )="">

    a.Value += t + ',' ;}

    Now, he adds "text", but not more than once for each different text on each drop-down list.

    There is always the question of the modification of a selected item in a combobox control, how do I remove the old text from the text box but I think than any forced recalculation should be enough.

    Thank you for taking the time to respond and for the link!

  • How can I send a file containing links so that they can use the links

    I bought two copies of a file that is a list of links.  I want to send to a friend, but want to make sure, that the links will work.  Can someone help me with this, not Adobe do send?

    Post edited by: Marion Steinbrenner THIS QUESTION has NO ANSWER RECEIVED.

    Send Adobe can certainly do that.

    Or you can do it manually:

    1. Download the file on Acrobat.com
    2. Check the file on Acrobat.com site, and then click send
    3. Use create an anonymous link and click the button to create a link
    4. copy the created download link and send it by e-mail
  • Computer automatically restarts and displays the blue screen. How can I fix it?

    original title: blue screen problem

    Hi, my computer has been restaring, and a blue screen appears.

    I'm not so technical by nature, so I hope I can get a few step by step for how to solve this problem-if I can.

    The message that I could find on the problem (s) are present:

    Problemsignature

    Problem event name: BlueScreen

    The system version: 6.0.6002.2.2.0.768.3

    Local ID: 1044

    Files that describe the problem

    More information about the problem:

    Hey Mirjam Irene,

    1. What is the error message on blue screen?

    2. did you of recent changes on the computer?

    3 when was the last time it was working fine?

    4. do you have security software installed on the computer?

    5. once the computer is restarted and the blue screen occurs?

    Check if the problem persists in the safe mode and after back with the results.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Restart the computer to return to normal mode.

    If the problem persists in safe mode, and then see the Microsoft article below and try the steps mentioned, check if it helps.

    How to fix BlueScreen (STOP) errors that cause Windows Vista to shut down or restart unexpectedly

    http://support.Microsoft.com/kb/958233

     

    If the previous step fails, then check the event viewer for the cause of blue screen and message comes back with the details.

    What are the information contained in the logs of the event (Event Viewer)?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-information-appears-in-event-logs-Event-Viewer

    I hope this helps!

    Halima S - Microsoft technical support.

Maybe you are looking for