ContributionsMost RecentMost LikesSolutionsRe: Button: save the new record and edit the new record Hi Mark, thanks for the response! I think we got the same answer. Re: Button: save the new record and edit the new record Hi Mike, Thanks for your hint. I made it works by moving the RID out the URLEncode. Here is the final code: var text RID = If([Record ID#] > 0, ToText([Record ID#]), "%%RID%%"); var Text edit=URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid="&$RID &"&_fid_20="&URLEncode("Yes"); var text reDirect = URLRoot() & Dbid()?act=er&rid="; var Text URL=$Edit & "&rdr=" & URLEncode($reDirect)& $RID; "<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:200px; text-align: center; text-shadow: none; border: 2px solid #0863f5; font-size: 16px \"href='" & $URL & "'>Issue Announcement</a>" Re: Add Save and Keep Working Button on form for a new record Hi Mike, thanks for the response. what I am struggling with is how to redirect to the newly created record. Somehow the $RID failed when URLEncoded in the redirect. Re: Button: save the new record and edit the new record Hi Mark, I think you caught the point. The %%rid%% is used twice in the formula. 1st time is working, the 2nd time is URLEncoded in the redirect and it fails. Can't wait to see how to make it working. Thanks again. Here is the code: var text RID = If([Record ID#] > 0, ToText([Record ID#]), "%%RID%%"); var Text edit=URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid="&$RID &"&_fid_20="&URLEncode("Yes"); var text reDirect = URLRoot() & Dbid()?act=er&rid="&$RID; var Text URL=$Edit & "&rdr=" & URLEncode($reDirect); "<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:200px; text-align: center; text-shadow: none; border: 2px solid #0863f5; font-size: 16px \"href='" & $URL & "'>Issue Announcement</a>" Re: Button: save the new record and edit the new record I am able to make it work. However, if trying to redirect to the newly saved record: redirect =URLRoot() & "db/" & Dbid() & "?act=er&rid=%%rid%%; It giving an error message, seems the %%rid%% can only be used once? Re: Saved Value is not registering before redirect not sure if table A is the parent table of table B or not. If so, edit at least one field in the Table A Button: save the new record and edit the new record Hi, From the previous post (Add Save and Keep Working Button on form for a new record), Hunter provided a wonderful solution to save the new record. If going further, is it possible to edit the new record within the same URL? I tried the following, but got the error message "Missing "rid" parameter" "URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=%%rid%%" &"&_fid_20="&URLEncode("Yes"); My intention is to use one button instead of two buttons to provide the function: (1) save the current new record (2) edit this new record. Any suggestion? Thanks in advance! SolvedRe: Add Save and Keep Working Button on form for a new record Hi Chayce, thanks for the solution. If going further, is it possible to edit the new record within the URL? I tried the following, but got the error message "Missing "rid" parameter" "URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=%%rid%%" &"&_fid_20="&URLEncode("Yes"); Any suggestion? Thanks in advance! Re: Jinjia question Just give a quick update. By using namespace function as Prashant 's instruction, I am able to calculate each total within each cycle and assign the value to the child table. Thanks again for Prashant's post. ------------------------------ Hongkun liang ------------------------------ Re: Jinjia question Hi Marcelo, appreciated for the code. In your code the value of adate is re-set each cycle in the loop. However, I'd like to keep the value in the previous cycle, such as Adate= Adate +time.delta(days=1) In my actual code, if the date is following into weekend, it will change to the next weekday. Then the date in the next cycle will be calculated based on the value in the previous cycle. Thanks! ------------------------------ Hongkun liang ------------------------------