http://coldfusion.com logo
Join Slack
Powered by
# cfml-beginners
  • b

    bdw429s

    09/04/2022, 1:50 AM
    What version of CommandBox? I just released 5.6.0 today and I did update that jboss library.
    v
    • 2
    • 17
  • n

    nickg

    09/07/2022, 5:52 PM
    Hey all. Quick question. We have a CMS with a form builder using CF. You can create forms that display on the web (in our cms). A client wants to embed one of our awesome forms on their website hosted on another platform. Anyone do that before? If so, how? I've been googling it but all the results are from form companies (jot form, google form, mailchimp, etc.) showing how to embed their forms. I'm not finding much on how to make this tech work on the back end.
    a
    b
    +2
    • 5
    • 10
  • a

    Adam Cameron

    09/08/2022, 6:40 PM
    Say I have a struct:
    Copy code
    st = {
        top = {
            middle = {
                bottom = "value I want"
            }
        }
    }
    And a path to a key held in a string, eg:
    Copy code
    keyPath = "top.middle.bottom"
    Is the CFML-idiomatic way of fetching the value I want gonna be something like:
    Copy code
    valueIWant = structGet("st.#keyPath#")
    Repro: https://trycf.com/gist/ac86ec8b0166c0715e37ac1f74c87684/acf2021?theme=monokai Note: I know this works, I'm just wondering whetherin CFML-current there's a better way?
    structGet
    always seems so clunky to me. I feel I am forgetting something...
    b
    s
    +2
    • 5
    • 29
  • f

    Formiko

    09/09/2022, 8:00 PM
    I have a lot of code to maintain from a prior employee and of course like an expert programmer, he left no comments, because good code always comments itself right? But seriously, practically every page has <cfsilent> tags, and from what I see, they is no need to use them. I asked him why he used them in an email to him, but he only said "read the docs!". Was there a cfsilent fad awhile back that I was unaware of? It's standard html, do I need to post some of the code for you guys to discern? Is it sort of a comment tag?
    b
    s
    +7
    • 10
    • 43
  • f

    Formiko

    09/13/2022, 6:16 PM
    Spx?
  • m

    Mark Takata (Adobe)

    09/13/2022, 6:31 PM
    Stored Procedures? The way this is being run seems odd. I would connect to MSSQL using the built in drivers and use CFSTOREDPROC
  • e

    Erik Jespersen

    09/13/2022, 7:29 PM
    @Brian Mardirosian Did you ever tell me about this? It's potentially the most useful thing I've found yet!
  • v

    Viral

    09/14/2022, 3:45 PM
    Not exactly a CF thing. I have upgraded a CF application (from Apache to IIS 10) with some removed functionality/Pages Task is to redirect the removed pages to some different URL (which I think can be only handled by IIS) e.g.
    Copy code
    <url 1> (deleted) when called should go to <url a>(Not in CF)
    Copy code
    <url 2> (deleted) when called should go to <url b>(In CF)
    I checked the IIS redirect doc but there is no mention of URL to URL redirections https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpredirect/ is there a simple way which I am missing ?
    p
    r
    +3
    • 6
    • 11
  • a

    Adam Cameron

    09/17/2022, 9:07 PM
    @Umair Khan please don't post the same thing to multiple channels. I'm deleting all the ones except this one.
  • u

    Umair Khan

    09/17/2022, 9:07 PM
    I will take care of it next
  • a

    Adam Cameron

    09/17/2022, 9:09 PM
    Pls also se threads. Looks to me like you might only have J2EE sessions enabled? I have some recollection that CFID/CFTOKEN aren't set if you have those switched on?
    u
    • 2
    • 1
  • a

    Andreas

    09/20/2022, 2:10 PM
    Does anybody know if the openCfmlFoundation still exist? Are they active? Can't get any info about it in the net. The site is down and latest tweets are from 2015.
    r
    • 2
    • 1
  • s

    Simone

    09/20/2022, 6:19 PM
    does cfldap usetls will only work if AD server has tls enabled or there are other things which i am missing
    f
    • 2
    • 2
  • e

    epipko

    09/21/2022, 11:13 PM
    I have a question about processing data for lines where checkbox is checked. When I hit "Submit", I need to end up with 5 lines in a table. Here is the data in a screenshot. Checkbox''s values is unique.
    Copy code
    <CFLOOP  query = "ship_details">
    				<tr bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'), DE('f8f8f8'))#">
    					<TD class="TDC" align="right"><INPUT TYPE="CHECKBOX" name="MYCHECKBOX" value="#ship_details.cust_po_nbr#" ID="chkPo" checked></TD>
    					<TD class="TDC">#ship_details.cust_po_nbr#</TD>
    					<TD class="TDC">#ship_details.store_id#</TD>
    					<TD class="TDC">#ship_details.numb_of_cart#</TD>
    					<TD class="TDC">#ship_details.total_qty#</TD>
    					<TD class="TDC">#ship_details.weight#</TD>
    					<TD class="TDC">#ship_details.volume#</TD>
    					<cfif form.soldto EQ "AMAZON">
    						<TD class="TDC"><cfinput name="pallets" type="text" size="10"></TD>
    					</cfif>			
    				</TR>
    			</CFLOOP>
    When I try to do streight insert into a table, I am getting an error (too many values) because value for "pallets" comes across as "1,1,3,4,6" How do I loop over checked lines?
    m
    e
    • 3
    • 7
  • n

    Nick

    09/23/2022, 8:41 PM
    Anyone know a way to pull the filename of a file (in cfscript in ACF 2018) where I'm starting from a URL path to the file (which doesn't itself contain the filename)? For example:
    Copy code
    somePdfUrl = "<https://mydocumentserver.com/pdfs/9FE4DB59-39FB-45ED-A0D0B0171D55EC33>";
    pdfFilename = ???
    I can bring the file in as a binary using
    fileReadBinary( somePdfUrl )
    . Hoped maybe I could do something with it from there, but I think I'm not asking Google the right questions.
    j
    m
    • 3
    • 15
  • g

    gsr

    09/26/2022, 9:30 PM
    i am consuming one API and the resopnse is weird i am getting undefined in the struct struct actualRunway : undefined i am looping over a struct and if i add a check using isDefined, it says syntactically invalid call to isDefined,. if i compare the value to undefined, i am still getting an error
    Copy code
    <cfloop collection="#arrival#" item="idx">
    <cfif isDefined('arrival[idx]') and arrival[idx] neq 'undefined'>
    a
    a
    • 3
    • 3
  • g

    gsr

    09/27/2022, 11:27 AM
    using custom json serializer fixed the issue, CF sends undefined, it sucks
    a
    • 2
    • 1
  • f

    Formiko

    09/28/2022, 3:59 PM
    I have a question about dates. request.datedue = CreateDateTime(2022,09,27,23,59,59)
  • f

    Formiko

    09/28/2022, 4:00 PM
    <cfif now() GTE request.datedue> I oct 1 less thna today's date?
  • m

    Marc Funaro

    09/28/2022, 4:02 PM
    can't tell what you're asking here.
  • f

    Formiko

    09/28/2022, 4:05 PM
    it's asking if today is greater than sept 27. is it?
  • a

    Adam Palcich

    09/28/2022, 4:06 PM
    I'd recommend you use DateCompare() if you'd like to know for sure https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-c-d/DateCompare.html
  • m

    Marc Funaro

    09/28/2022, 4:06 PM
    today is sept 28. that would be greater than sept 27th. your best bet here is to test the code out for yourself, and then post your actual code with any questions.
  • m

    Marc Funaro

    09/28/2022, 4:07 PM
    But I agree with Adam, best to compare the two dates using DateCompare.
  • a

    Adam Palcich

    09/28/2022, 4:08 PM
    DateCompare also lets you dial in the precision you are looking for. Just the day, minute, hour, etc.
  • f

    Formiko

    09/28/2022, 4:08 PM
    i'm editing existing code. a page will be on that date..I want to mak available on another date
  • f

    Formiko

    09/28/2022, 4:10 PM
    i want to just change the date to oct 1st..i want to test to see if it work, so i'm tryng to havwe it changed to today
  • f

    Formiko

    09/28/2022, 4:11 PM
    the old developer has very obfuscated code
  • m

    Marc Funaro

    09/28/2022, 4:12 PM
    you're not giving us nearly enough to go on. Please review https://www.freecodecamp.org/news/how-to-ask-good-technical-questions/ and return with a solid question, example code, and what you've attempted up to the point where you have your misunderstanding.
  • f

    Formiko

    09/28/2022, 4:23 PM
    This is the code <cfset request.datedue = CreateDateTime(2022,09,27,23,59,59)> then down the page <cfif now() GTE request.datedue> so I have to change request.datedue
    m
    a
    • 3
    • 2
12345...8Latest