Maybe in your scenario an ajax button would be better? I don’t remember it sc_redir is usable with ajax buttons. PHP buttons “go” somewhere and have a specific target setting: “same window” or “other window”. Try the sc_ajax_message with no options but the message itself.Īlso, what kind of form button are you using? The ELSE part works perfectly when all required fields are filled, just the first part is not ok, even if no code is there, I will always get redirected to this empty page with the OK button Sc_redir('item_details_newly_added', selectedItemID=$new_itemID, '_parent') You can check that fields are populated before executing the sql insert, using the standard SC syntax for reading fields (i.e. scredir (apl, parm1 parm2, target,error) Macro to redirect the processing to other application or URL. Then trying to only put the param without the declaration “param = …”ĭon’t know what else to try! any suggestions?ĮDIT: ok nvm, I found the solution myself, as I usally was passing an ID to this application by a Field Link, now that I was using sc_redir there was no variable defined to store the ID, so what I did is just declare a WHERE clause with a global var, and then pass the ID into that var inside the sc_redir, now it works perfectly!!Īnd for future reference, to retrieve the ID in the same code where the sql_insert is, we need to use SCOPE_IDENTITY() and not LAST_INSERT_ID() The variants I tried are, using ‘ ’ instead of a simple comma after the param, The new_itemID variable is storing correctly the newly created ID as I did an echo on it and it show correctly This macro its used to redirect the processing to other application or URL.What is ScriptcaseAn efficient web development low-code platform. Development Scriptcase Using the scredir and. Sc_redir(‘item_details’, param = $new_itemID, ‘_parent’) Design & UX Development Front-end Project management Scriptcase Security 12 IT Trends to Keep an Eye on in 2023. SCOPE_IDENTITY() it works, I echo the result and the ID is correct and it gets retrieved right after the insert,īut someone the sc_redir doesnt work! it redirects corretly to the application I want, but the parameters isnt passed, as it opens a no records page, is my syntax correct? I tried multiple variants but no success I made some progress, with LAST_INSERT_ID() I couldnt retrieve the ID as we discussed, but with: Scriptcase SOLVED The scredir (.) macro returns to record number 1 instead of the current record Scriptcase 9 Bugs kkkpe December 17, 2020, 7:42pm 1. Hello, I will definetely try this approach, but I’m giving one last try to my attempt solution. The detailed view can be put in a block and the block can be conditionally shown\hidden: there’s an SC macro for that. I would like to redirect each group to a initial application when they log in.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |