如何在 APEX 中创建成功消息,显示列值。

huangapple go评论67阅读模式
英文:

How to create Success message with column value displayed in APEX

问题

“Ron成功地移动到另一个表格。”
英文:

I have the following table

id first_name last_name
1 Harry Potter
2 Hermione Granger
3 Ron Weasley

I created a button with process that deletes the checkbox selected row and moves it to another table:

INSERT INTO target_table (PK_1, first_name, last_name)
SELECT PK, first_name, last_name FROM source_table WHERE PK IN (SELECT column_value FROM apex_string.split(:P3_SELECTED_ID,':'));

DELETE FROM source_table WHERE PK IN (SELECT column_value FROM apex_string.split(:P3_SELECTED_ID,':'));

I would like to create a Success message when the rows is deleted which looks like the following:

"Ron was successfully moved to another table"

What I tried so far?

I created a success message in Process - Identification -Success Message

> first_name was successfully moved to another table

But this does not display the first_name as Ron or any other selected row. How to I solve this?

答案1

得分: 1

以下是翻译好的部分:

有2件重要的事情在这里

  1. 在Apex中引用某物时,请使用页面项目。
  2. 在HTML中引用页面项目的语法是&P_ITEM.语法。

因此,成功消息应该类似于

请确保使用要从表中删除的值填充页面项目。请注意,页面项目是标量值。要获取多个值,请使用逗号分隔的列表。

英文:

There are 2 things of importance here

  1. To reference something in apex, use page items.
  2. The syntax for referencing a page item in html is the &P_ITEM. syntax.

So the success message should be something like

&P1_FIRST_NAME. was successfully moved to another table

Make sure to populate the page item with the value you are deleting from the table. Note that page items are scalar values. To get multiple values, use a comma separated list.

huangapple
  • 本文由 发表于 2023年3月31日 17:41:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/75897007.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定